summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-nm
Commit message (Collapse)AuthorAgeFilesLines
...
* Change the begin and end methods in ObjectFile to match the style guide.Rafael Espindola2014-02-101-12/+12
| | | | llvm-svn: 201108
* Use the information provided by getFlags to unify some code in llvm-nm.Rafael Espindola2014-02-051-90/+73
| | | | | | | | | | It is not clear how much we should try to expose in getFlags. For example, should there be a SF_Object and a SF_Text? But for information that is already being exposed, we may as well use it in llvm-nm. llvm-svn: 200820
* Small fix for llvm-nm handling of weak symbols on ELF (print 'v').Rafael Espindola2014-02-041-2/+6
| | | | llvm-svn: 200808
* Move error handling down to getSymbolNMTypeChar.Rafael Espindola2014-02-041-54/+30
| | | | llvm-svn: 200727
* Simplify getSymbolFlags.Rafael Espindola2014-01-311-3/+1
| | | | | | | None of the object formats require extra parsing to compute these flags, so the method cannot fail. llvm-svn: 200574
* This file already has a "using namespace object;", use it.Rafael Espindola2014-01-301-22/+20
| | | | llvm-svn: 200493
* Only ELF has a dynamic symbol table. Remove it from ObjectFile.Rafael Espindola2014-01-301-2/+28
| | | | | | | | | COFF has only one symbol table. MachO has a LC_DYSYMTAB, but that is not a symbol table, just extra info about the one symbol table (LC_SYMTAB). IR (coming soon) also has only one table. llvm-svn: 200488
* Use early returns and factor the object::Binary creation.Rafael Espindola2014-01-301-69/+59
| | | | llvm-svn: 200484
* Simplify the handling of iterators in ObjectFile.Rafael Espindola2014-01-301-4/+1
| | | | | | | | | | | | None of the object file formats reported error on iterator increment. In retrospect, that is not too surprising: no object format stores symbols or sections in a linked list or other structure that requires chasing pointers. As a consequence, all error checking can be done on begin() and end(). This reduces the text segment of bin/llvm-readobj in my machine from 521233 to 518526 bytes. llvm-svn: 200442
* Fix TLS handling in ELF's getAddress and llvm-nm to print 'D' for it.Rafael Espindola2014-01-301-0/+1
| | | | llvm-svn: 200433
* Normalize the style in llvm-nm.cpp.Rafael Espindola2014-01-291-298/+308
| | | | | | | It had grown fairly inconsistent. I am about to change it quite a bit to also use the object api when handling IR files. llvm-svn: 200374
* Pass the computed magic to createBinary and createObjectFile if available.Rafael Espindola2014-01-221-3/+3
| | | | | | | identify_magic is not free, so we should avoid calling it twice. The argument also makes it cheap for createBinary to just forward to createObjectFile. llvm-svn: 199813
* Rename these methods to match the style guide.Rafael Espindola2014-01-211-4/+4
| | | | llvm-svn: 199751
* Return an ErrorOr<Binary *> from createBinary.Rafael Espindola2014-01-151-6/+9
| | | | | | | | I did write a version returning ErrorOr<OwningPtr<Binary> >, but it is too cumbersome to use without std::move. I will keep the patch locally and submit when we switch to c++11. llvm-svn: 199326
* Make parseBitcodeFile return an ErrorOr<Module *>.Rafael Espindola2014-01-151-11/+8
| | | | llvm-svn: 199279
* [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.NAKAMURA Takumi2013-12-101-1/+6
| | | | llvm-svn: 196908
* move getSymbolNMTypeChar to the one program that needs it: nm.Rafael Espindola2013-11-021-1/+224
| | | | llvm-svn: 193933
* Revert "Encapsulate PassManager debug flags to avoid static init and cxa_exit."Andrew Trick2013-09-191-5/+0
| | | | | | | | Working on a better solution to this. This reverts commit 7d4e9934e7ca83094c5cf41346966c8350179ff2. llvm-svn: 190990
* Encapsulate PassManager debug flags to avoid static init and cxa_exit.Andrew Trick2013-09-181-0/+5
| | | | | | | | | | | | | | This puts all the global PassManager debugging flags, like -print-after-all and -time-passes, behind a managed static. This eliminates their static initializers and, more importantly, exit-time destructors. The only behavioral change I anticipate is that tools need to initialize the PassManager before parsing the command line in order to export these options, which makes sense. Tools that already initialize the standard passes (opt/llc) don't need to do anything new. llvm-svn: 190974
* Don't crash in 'llvm -s' when an archive has no symtab.Rafael Espindola2013-07-101-11/+14
| | | | llvm-svn: 186029
* Make llvm-nm return 1 on error.Rafael Espindola2013-07-031-0/+8
| | | | | | | This is a small compatibility improvement with gnu nm and makes llvm-nm more useful as a testing tool. llvm-svn: 185546
* Basic support for parsing Mach-O universal binaries in LLVMObject libraryAlexey Samsonov2013-06-181-0/+18
| | | | llvm-svn: 184191
* Don't link with the archive library programs that don't use it.Rafael Espindola2013-06-173-3/+3
| | | | llvm-svn: 184081
* Remove unused header.Rafael Espindola2013-06-141-1/+0
| | | | llvm-svn: 183968
* Remove the program class.Rafael Espindola2013-06-121-1/+1
| | | | | | | It was only used to implement ExecuteAndWait and ExecuteNoWait. Expose just those two functions and make Execute and Wait implementations details. llvm-svn: 183864
* [Object][Archive] Improve performance.Michael J. Spencer2013-02-031-1/+3
| | | | | | | | | | | | 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. llvm-svn: 174272
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-2/+2
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Sort the #include lines for tools/...Chandler Carruth2012-12-041-4/+4
| | | | | | | | Again, tools are trickier to pick the main module header for than library source files. I've started to follow the pattern of using LLVMContext.h when it is included as a stub for program source files. llvm-svn: 169252
* llvm-nm: Make sort more stable when symbol names are equal.Daniel Dunbar2012-11-131-1/+12
| | | | llvm-svn: 167866
* Adding changes to support GNU style archive library readingShankar Easwaran2012-11-131-0/+22
| | | | llvm-svn: 167853
* Add hidden flag to exclude aliases from output.Jan Sjödin2012-09-181-2/+6
| | | | llvm-svn: 164158
* Change the `linker_private_weak_def_auto' linkage to `linkonce_odr_auto_hide' toBill Wendling2012-08-171-1/+0
| | | | | | | | | | | | | | | | | | | | make it more consistent with its intended semantics. The `linker_private_weak_def_auto' linkage type was meant to automatically hide globals which never had their addresses taken. It has nothing to do with the `linker_private' linkage type, which outputs the symbols with a `l' (ell) prefix among other things. The intended semantic is more like the `linkonce_odr' linkage type. Change the name of the linkage type to `linkonce_odr_auto_hide'. And therefore changing the semantics so that it produces the correct output for the linker. Note: The old linkage name `linker_private_weak_def_auto' will still parse but is not a synonym for `linkonce_odr_auto_hide'. This should be removed in 4.0. <rdar://problem/11754934> llvm-svn: 162114
* [llvm-nm] Update documentation to cover object file support and arguments.Michael J. Spencer2012-06-061-5/+5
| | | | llvm-svn: 158120
* Fix uses of the C99 PRI format macros not to conflict with C++11 UDLs.Benjamin Kramer2012-03-101-2/+3
| | | | llvm-svn: 152474
* In the ObjectFile interface, replace isInternal(), isAbsolute(), isGlobal(), ↵David Meyer2012-02-281-3/+3
| | | | | | and isWeak(), with a bitset of flags. llvm-svn: 151670
* [Object] Add {begin,end}_dynamic_symbols stubs and implementation for ELF.Michael J. Spencer2012-02-281-3/+13
| | | | | | | | Add -D option to llvm-nm to dump dynamic symbols. Patch by David Meyer. llvm-svn: 151600
* Remove unused variables.Rafael Espindola2011-12-251-1/+1
| | | | llvm-svn: 147261
* llvm-nm: refactor in order to support reading files from stdin.Michael J. Spencer2011-12-131-31/+40
| | | | llvm-svn: 146524
* LLVMBuild: Remove trailing newline, which irked me.Daniel Dunbar2011-12-121-1/+0
| | | | llvm-svn: 146409
* Fixed ObjectFile functions:Danil Malyshev2011-11-291-1/+1
| | | | | | | | | | | - getSymbolOffset() renamed as getSymbolFileOffset() - getSymbolFileOffset(), getSymbolAddress(), getRelocationAddress() returns same result for ELFObjectFile, MachOObjectFile and COFFObjectFile. - added getRelocationOffset() - fixed MachOObjectFile::getSymbolSize() - fixed MachOObjectFile::getSymbolSection() - fixed MachOObjectFile::getSymbolOffset() for symbols without section data. llvm-svn: 145408
* Revert r145180 as it is causing test failures on all the bots.Chandler Carruth2011-11-271-1/+1
| | | | | | | | | | | | | Original commit message: Fixed ObjectFile functions: - getSymbolOffset() renamed as getSymbolFileOffset() - getSymbolFileOffset(), getSymbolAddress(), getRelocationAddress() returns same result for ELFObjectFile, MachOObjectFile and COFFObjectFile. - added getRelocationOffset() - fixed MachOObjectFile::getSymbolSize() - fixed MachOObjectFile::getSymbolSection() - fixed MachOObjectFile::getSymbolOffset() for symbols without section data. llvm-svn: 145182
* Fixed ObjectFile functions:Danil Malyshev2011-11-271-1/+1
| | | | | | | | | | | - getSymbolOffset() renamed as getSymbolFileOffset() - getSymbolFileOffset(), getSymbolAddress(), getRelocationAddress() returns same result for ELFObjectFile, MachOObjectFile and COFFObjectFile. - added getRelocationOffset() - fixed MachOObjectFile::getSymbolSize() - fixed MachOObjectFile::getSymbolSection() - fixed MachOObjectFile::getSymbolOffset() for symbols without section data. llvm-svn: 145180
* LLVMBuild: Add description files for the LLVM tools.Daniel Dunbar2011-11-111-0/+23
| | | | llvm-svn: 144417
* uint64 formatted output: replaced %llx with PRIx64 macro.Stepan Dyatkovskiy2011-10-281-2/+2
| | | | llvm-svn: 143191
* llvm-nm: Use correct format string. Patch by Stepan Dyatkovskiy!Michael J. Spencer2011-10-251-2/+2
| | | | llvm-svn: 142984
* build: Tidy up a bunch of tool Makefiles, and simplify where possible using theDaniel Dunbar2011-10-181-4/+4
| | | | | | new all-targets pseudo-component. llvm-svn: 142401
* llvm-nm: Don't leak bitcode buffers.Benjamin Kramer2011-10-101-2/+2
| | | | llvm-svn: 141534
* Fix GCC again.Michael J. Spencer2011-10-071-3/+3
| | | | llvm-svn: 141389
* Add binary archive support to llvm-nm.Michael J. Spencer2011-09-271-10/+27
| | | | llvm-svn: 140627
* Object: make the following changes into SymbolRefBenjamin Kramer2011-09-141-1/+1
| | | | | | | | | | | - Add enum SymbolType and function getSymbolType() - Add function isGlobal() - it's returns true for symbols that can be used in another objects, such as library functions. - Rename function getAddress() to getOffset() and add new function getAddress(), because currently getAddress() returns section offset of symbol first byte. new getAddress() return symbol address. - Change usage SymbolRef::getAddress() to getOffset() in tools/llvm-nm and tools/llvm-objdump. Patch by Danil Malyshev! llvm-svn: 139683
OpenPOWER on IntegriCloud