summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAge
* llvm-symbolizer: correctly parse filenames given in quotesAlexey Samsonov2013-04-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178859 91177308-0d34-0410-b5e6-96231b3b80d8
* Move obj2yaml to tools to sort out make's dependencies.Rafael Espindola2013-04-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178835 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't export symbols in every binary on linux.Rafael Espindola2013-04-04
| | | | | | | | | | | | On freebsd this makes sure that symbols are exported on the binaries that need them. The net result is that we should get symbols in the binaries that need them on every platform. On linux x86-64 this reduces the size of the bin directory from 262MB to 250MB. Patch by Stephen Checkoway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178725 91177308-0d34-0410-b5e6-96231b3b80d8
* Implements low-level object file format specific output for COFF andEric Christopher2013-04-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ELF with support for: - File headers - Section headers + data - Relocations - Symbols - Unwind data (only COFF/Win64) The output format follows a few rules: - Values are almost always output one per line (as elf-dump/coff-dump already do). - Many values are translated to something readable (like enum names), with the raw value in parentheses. - Hex numbers are output in uppercase, prefixed with "0x". - Flags are sorted alphabetically. - Lists and groups are always delimited. Example output: ---------- snip ---------- Sections [ Section { Index: 1 Name: .text (5) Type: SHT_PROGBITS (0x1) Flags [ (0x6) SHF_ALLOC (0x2) SHF_EXECINSTR (0x4) ] Address: 0x0 Offset: 0x40 Size: 33 Link: 0 Info: 0 AddressAlignment: 16 EntrySize: 0 Relocations [ 0x6 R_386_32 .rodata.str1.1 0x0 0xB R_386_PC32 puts 0x0 0x12 R_386_32 .rodata.str1.1 0x0 0x17 R_386_PC32 puts 0x0 ] SectionData ( 0000: 83EC04C7 04240000 0000E8FC FFFFFFC7 |.....$..........| 0010: 04240600 0000E8FC FFFFFF31 C083C404 |.$.........1....| 0020: C3 |.| ) } ] ---------- snip ---------- Relocations and symbols can be output standalone or together with the section header as displayed in the example. This feature set supports all tests in test/MC/COFF and test/MC/ELF (and I suspect all additional tests using elf-dump), making elf-dump and coff-dump deprecated. Patch by Nico Rieck! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178679 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't disassemble symbols with an unknown address or size.Eric Christopher2013-04-03
| | | | | | Patch by Nico Rieck! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178678 91177308-0d34-0410-b5e6-96231b3b80d8
* Run the ObjCARCContract pass for LTO. <rdar://problem/13538084>Bob Wilson2013-03-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178385 91177308-0d34-0410-b5e6-96231b3b80d8
* Manually update the dependencies in the Makefiles. It turns out that allChandler Carruth2013-03-26
| | | | | | | | | | | that work on the LLVMBuild based dependency specification didn't actually work, we just now maintain dependencies in *3* places instead of 2. Yay. There may still be some missing dependencies, I'm still sifting through the bots and my builds, but this is a step in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177988 91177308-0d34-0410-b5e6-96231b3b80d8
* Split out the IRReader header and the utility functions it provides intoChandler Carruth2013-03-26
| | | | | | | | | | | | | | | | | | | | | | | | its own library. These functions are bridging between the bitcode reader and the ll parser which are in different libraries. Previously we didn't have any good library to do this, and instead played fast and loose with a "header only" set of interfaces in the Support library. This really doesn't work well as evidenced by the recent attempt to add timing logic to the these routines. As part of this, make them normal functions rather than weird inline functions, and sink the implementation into the library. Also clean up the header to be nice and minimal. This requires updating lots of build system dependencies to specify that the IRReader library is needed, and several source files to not implicitly rely upon the header file to transitively include all manner of other headers. If you are using IRReader.h, this commit will break you (the header moved) and you'll need to also update your library usage to include 'irreader'. I will commit the corresponding change to Clang momentarily. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177971 91177308-0d34-0410-b5e6-96231b3b80d8
* [tools][llvm-readobj] print the name of the section when iterating the ↵Shankar Easwaran2013-03-25
| | | | | | symbol table / dynamic symbol table git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177873 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove stale commentEli Bendersky2013-03-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177410 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for r177390: map values are pointers, use DeleteContainerSeconds() ↵Alexey Samsonov2013-03-19
| | | | | | instead of .clear() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177409 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-symbolizer: flush internal caches functionalityDmitry Vyukov2013-03-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177390 91177308-0d34-0410-b5e6-96231b3b80d8
* Build LLVMgold.so on FreeBSD using cmake.Rafael Espindola2013-03-17
| | | | | | Patch by Stephen Checkoway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177233 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LTO codegen use a PassManager, rather than a FunctionPassManager, for theLang Hames2013-03-13
| | | | | | | | | | | | | | | codegen passes. This brings it in to line with clang and llc's codegen setup, and tidies up the code. If I understand correctly, adding ModulePasses to a FunctionPassManager is bogus. It only seems to explode if an added ModulePass depends on a FunctionPass though, which might be why this code has survived so long. Fixes <rdar://problem/13386816>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176977 91177308-0d34-0410-b5e6-96231b3b80d8
* Connect LLVM CMake build scripts to LLDB's CMake scripts:Daniel Malea2013-02-28
| | | | | | | | | | - if you have LLDB checked out in $llvm/tools, CMake will build it now! - LLDB is known to build on Linux with libstdc++ and GCC 4.6/4.7 or Clang 3.3 - to run lldb tests, do "make check-lldb" after a build git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176307 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the -disable-opt option to LTO. This adds:Bill Wendling2013-02-28
| | | | | | | | | | | | | | | - Consistency with opt (which supports the same option with the same meaning and description). - Debugging gold plugin-based linking without optimizations getting in the way. - Debugging programs linked with the gold plugin while preserving the original debug info. - Fine-grained control over LTO passes using the gold plugin in combination with opt (or clang/dragonegg). Patch by Cristiano Giuffrida! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176257 91177308-0d34-0410-b5e6-96231b3b80d8
* print TLS segmentShankar Easwaran2013-02-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176192 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to get rid of a -wunitialized warning: explicitly initialize the pointerEli Bendersky2013-02-26
| | | | | | | to NULL and use asserts to check in relevant places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176134 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix auto_ptr is deprecated warningsMatt Arsenault2013-02-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176123 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide workaround for PR 15130.Andrew Kaylor2013-02-25
| | | | | | | | This changes the RecordingMemoryManager in lli to use mapped memory rather than malloc to allocate memory for sections and uses a 'near' MemoryBlock to keep the allocations together. This works around a problem in MCJIT where relocations are applied to a generated image immediately oupon generation, which isn't appropriate for the remote case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176057 91177308-0d34-0410-b5e6-96231b3b80d8
* [objdump] Add PT_PHDR.Michael J. Spencer2013-02-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175709 91177308-0d34-0410-b5e6-96231b3b80d8
* [objdump] Print the PT_INTERP and PT_DYNAMIC correcctly.Michael J. Spencer2013-02-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175659 91177308-0d34-0410-b5e6-96231b3b80d8
* [llvm-readobj] Add ELF .dynamic table dumping.Michael J. Spencer2013-02-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175592 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-formatize llvm-symbolizer codeAlexey Samsonov2013-02-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175255 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-symbolizer: speedup symbol lookupDmitry Vyukov2013-02-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175158 91177308-0d34-0410-b5e6-96231b3b80d8
* Use 'RC_XBS' instead of 'RC_BUILDIT' to catch all times when it's built in ↵Bill Wendling2013-02-13
| | | | | | the Apple way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175069 91177308-0d34-0410-b5e6-96231b3b80d8
* Add static cast to unsigned char whenever a character classification ↵Guy Benyei2013-02-12
| | | | | | function is called with a signed char argument, in order to avoid assertions in Windows Debug configuration. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175006 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the pubnames section to llvm-dwarfdump.Krzysztof Parzyszek2013-02-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174976 91177308-0d34-0410-b5e6-96231b3b80d8
* Update with attribute group IDs.Bill Wendling2013-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174847 91177308-0d34-0410-b5e6-96231b3b80d8
* [readobj] Fix memory leak.Michael J. Spencer2013-02-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174687 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial support for DWARF CFI parsing and dumping in LLVMEli Bendersky2013-02-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174463 91177308-0d34-0410-b5e6-96231b3b80d8
* [objdump,readobj] Document the purpose and goals of each tool.Michael J. Spencer2013-02-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174439 91177308-0d34-0410-b5e6-96231b3b80d8
* Print error messages from MemoryBuffer::getFile() in llvm-symbolizerAlexey Samsonov2013-02-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174346 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace global std::string with const char[]Alexey Samsonov2013-02-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174332 91177308-0d34-0410-b5e6-96231b3b80d8
* [Object][Archive] Improve performance.Michael J. Spencer2013-02-03
| | | | | | | | | | | | Improve performance of iterating over children and accessing the member file buffer by caching the file size and moving code out to the header. This also makes getBuffer return a StringRef instead of a MemoryBuffer. Both fixing a memory leak and removing a malloc. This takes getBuffer from ~10% of the time in lld to unmeasurable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174272 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a copy/paste-o that got missed because 'check' doesn't build lto.Chandler Carruth2013-01-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174115 91177308-0d34-0410-b5e6-96231b3b80d8
* Give the MCStreamer class hierarchy LLVM RTTI facilities for use withChandler Carruth2013-01-31
| | | | | | | | | | | | | | | | isa<> and dyn_cast<>. In several places, code is already hacking around the absence of this, and there seem to be several interfaces that might be lifted and/or devirtualized using this. This change was based on a discussion with Jim Grosbach about how best to handle testing for specific MCStreamer subclasses. He said that this was the correct end state, and everything else was too hacky so I decided to just make it so. No functionality should be changed here, this is just threading the kind through all the constructors and setting up the classof overloads. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174113 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for source and line information to IntelJITEventListener for ↵Andrew Kaylor2013-01-28
| | | | | | object emitted by MCJIT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173712 91177308-0d34-0410-b5e6-96231b3b80d8
* Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation ↵Michael Gottesman2013-01-28
| | | | | | for refactoring the ARC Optimizer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173647 91177308-0d34-0410-b5e6-96231b3b80d8
* Add DIContext::getLineInfoForAddressRange() function and test. This ↵Andrew Kaylor2013-01-26
| | | | | | function allows a caller to obtain a table of line information for a function using the function's address and size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173537 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for applying in-memory relocations to the .debug_line section ↵Andrew Kaylor2013-01-25
| | | | | | and, in the case of ELF files, using symbol addresses when available for relocations to the .debug_info section. Also extending the llvm-rtdyld tool to add the ability to dump line number information for testing purposes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173517 91177308-0d34-0410-b5e6-96231b3b80d8
* When encountering an unknown file format, ObjectFile::createObjectFile shouldEli Bendersky2013-01-25
| | | | | | | | | | | politely report it instead of running into llvm_unreachable. Also patch llvm-dwarfdump to actually check whether the file it's attempting to dump is a valid object file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173489 91177308-0d34-0410-b5e6-96231b3b80d8
* Add command-line flags for DWARF dumping.Eli Bendersky2013-01-25
| | | | | | | | | Flags for dumping specific DWARF sections added in lib/DebugInfo and llvm-dwarfdump. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173480 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename variable to be more comprehensible and follow naming conventionEli Bendersky2013-01-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173460 91177308-0d34-0410-b5e6-96231b3b80d8
* [bugpoint] make tool selection messages uniqueSaleem Abdulrasool2013-01-24
| | | | | | | | | | Change messages to help identify which interpreter was actually selected (safe vs testing). Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> Reviewed-by: Chandler Carruth <chandlerc@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173360 91177308-0d34-0410-b5e6-96231b3b80d8
* [bugpoint] set Message after tool configurationSaleem Abdulrasool2013-01-24
| | | | | | | | | | | Set the message returned after the GCC runner has been constructed as otherwise the message will be overwritten by the construction of the runner, resulting in misleading messages. Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> Reviewed-by: Chandler Carruth <chandlerc@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173359 91177308-0d34-0410-b5e6-96231b3b80d8
* lli/RecordingMemoryManager: Free allocated sections in the destructor to ↵NAKAMURA Takumi2013-01-24
| | | | | | | | satisfy --vg-leak! FIXME: It could be generalized in MemoryManager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173349 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-symbolizer: factor out bits of the tool into separate ↵Alexey Samsonov2013-01-22
| | | | | | LLVMSymbolize.{h,cpp} files. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173159 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix missed out llvm-stress after APFloat change.Tim Northover2013-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173141 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] bugpoint-passes should not be built in "all", when LLVM_BUILD_TOOLS ↵NAKAMURA Takumi2013-01-22
| | | | | | is OFF. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173112 91177308-0d34-0410-b5e6-96231b3b80d8