summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-nm/llvm-nm.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* llvm-nm: refactor in order to support reading files from stdin.Michael J. Spencer2011-12-131-31/+40
| | | | llvm-svn: 146524
* 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
* 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
* 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
* Object: Add proper error handling.Michael J. Spencer2011-06-251-7/+21
| | | | llvm-svn: 133872
* Modify llvm-nm to use new Binary creation method.Michael J. Spencer2011-06-251-5/+5
| | | | llvm-svn: 133871
* Make Binary the parent of ObjectFile and update children to new interface.Michael J. Spencer2011-06-251-1/+1
| | | | llvm-svn: 133870
* Revert the last two commits in the series. r132911, r132912.Michael J. Spencer2011-06-131-6/+6
| | | | llvm-svn: 132913
* Modify llvm-nm to use new Binary creation method.Michael J. Spencer2011-06-131-5/+5
| | | | llvm-svn: 132912
* Make Binary the parent of ObjectFile and update children to new interface.Michael J. Spencer2011-06-131-1/+1
| | | | llvm-svn: 132911
* llvm-nm: Update to use the new LLVMObject library.Michael J. Spencer2011-01-201-30/+190
| | | | llvm-svn: 123897
* MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> ↵Michael J. Spencer2010-12-161-4/+2
| | | | | | via an out parm. llvm-svn: 121958
* Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with ↵Michael J. Spencer2010-12-091-1/+5
| | | | | | error_code &ec. And fix clients. llvm-svn: 121379
* Merge System into Support.Michael J. Spencer2010-11-291-1/+1
| | | | llvm-svn: 120298
* Cleanup Whitespace.Michael J. Spencer2010-08-311-4/+4
| | | | llvm-svn: 112587
* - Add the LinkerPrivateWeakDefAutoLinkage to the Ada bindings.Bill Wendling2010-08-241-2/+5
| | | | | | - Support the LinkerWeak*Linkage types in llvm-nm and in LinkModules.cpp. llvm-svn: 111952
* Implement the "linker_private_weak" linkage type. This will be used forBill Wendling2010-07-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | Objective-C metadata types which should be marked as "weak", but which the linker will remove upon final linkage. However, this linkage isn't specific to Objective-C. For example, the "objc_msgSend_fixup_alloc" symbol is defined like this: .globl l_objc_msgSend_fixup_alloc .weak_definition l_objc_msgSend_fixup_alloc .section __DATA, __objc_msgrefs, coalesced .align 3 l_objc_msgSend_fixup_alloc: .quad _objc_msgSend_fixup .quad L_OBJC_METH_VAR_NAME_1 This is different from the "linker_private" linkage type, because it can't have the metadata defined with ".weak_definition". Currently only supported on Darwin platforms. llvm-svn: 107433
* Revert r107205 and r107207.Bill Wendling2010-06-291-2/+1
| | | | llvm-svn: 107215
* Introducing the "linker_weak" linkage type. This will be used for Objective-CBill Wendling2010-06-291-1/+2
| | | | | | | | | | | | | | | | | | | metadata types which should be marked as "weak", but which the linker will remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is defined like this: .globl l_objc_msgSend_fixup_alloc .weak_definition l_objc_msgSend_fixup_alloc .section __DATA, __objc_msgrefs, coalesced .align 3 l_objc_msgSend_fixup_alloc: .quad _objc_msgSend_fixup .quad L_OBJC_METH_VAR_NAME_1 This is different from the "linker_private" linkage type, because it can't have the metadata defined with ".weak_definition". llvm-svn: 107205
* fix leakage of ModuleNuno Lopes2009-09-101-4/+3
| | | | llvm-svn: 81445
* Add plumbing for the `linker_private' linkage type. This type is meant forBill Wendling2009-07-201-1/+2
| | | | | | | | | "private" symbols which the assember shouldn't strip, but which the linker may remove after evaluation. This is mostly useful for Objective-C metadata. This is plumbing, so we don't have a use of it yet. More to come, etc. llvm-svn: 76385
* Convert more tools code from cerr and cout to errs() and outs().Dan Gohman2009-07-161-13/+12
| | | | llvm-svn: 76070
* To simplify the upcoming context-on-type change, switch all command line ↵Owen Anderson2009-07-151-1/+1
| | | | | | | | tools to using the default global context for now. This will let us to hardwire stuff to the global context in the short term while the API is sorted out. llvm-svn: 75846
* Use errs() instead of std::cerr.Dan Gohman2009-07-151-5/+6
| | | | llvm-svn: 75791
* Hold the LLVMContext by reference rather than by pointer.Owen Anderson2009-07-011-2/+2
| | | | llvm-svn: 74640
* Add a pointer to the owning LLVMContext to Module. This requires threading ↵Owen Anderson2009-07-011-2/+5
| | | | | | | | | | LLVMContext through a lot of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools. Patches for Clang and LLVM-GCC to follow. llvm-svn: 74614
* Add a new "available_externally" linkage type. This is intendedChris Lattner2009-04-131-8/+10
| | | | | | | | to support C99 inline, GNU extern inline, etc. Related bugzilla's include PR3517, PR3100, & PR2933. Nothing uses this yet, but it appears to work. llvm-svn: 68940
* Change various llvm utilities to use PrettyStackTraceProgram inChris Lattner2009-03-061-2/+6
| | | | | | | their main routines. This makes the tools print their argc/argv commands if they crash. llvm-svn: 66248
* Add the private linkage.Rafael Espindola2009-01-151-1/+2
| | | | llvm-svn: 62279
* Add CommonLinkage to lto (treated same as weak AFAICT)Dale Johannesen2008-05-161-0/+1
| | | | | | and llvm-nm (prints as C). llvm-svn: 51209
* remove attributions from tools.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45421
* Move the space in overview output for commands out of each of theDan Gohman2007-10-081-1/+1
| | | | | | commands and into the common code. llvm-svn: 42752
* Here is the bulk of the sanitizing.Gabor Greif2007-07-051-2/+2
| | | | | | Almost all occurrences of "bytecode" in the sources have been eliminated. llvm-svn: 37913
* llvm-nm must print the alias symbols.Lauro Ramos Venancio2007-06-271-5/+13
| | | | llvm-svn: 37766
* use the new MemoryBuffer interfaces to simplify error reporting in clients.Chris Lattner2007-05-061-1/+1
| | | | llvm-svn: 36900
* switch tools to bitcode instead of bytecodeChris Lattner2007-05-061-15/+2
| | | | llvm-svn: 36868
* add bitcode reading support to llvm-nmChris Lattner2007-05-061-22/+32
| | | | llvm-svn: 36847
* Remove some non-sensical logic that prevented llvm-nm from working on anyReid Spencer2007-03-291-5/+0
| | | | | | file other than one named "-". llvm-svn: 35478
* Unbreak VC++ build.Jeff Cohen2007-03-051-0/+1
| | | | llvm-svn: 34917
* push bytecode decompressor out through APIs. Now the bytecode readerChris Lattner2007-02-071-1/+3
| | | | | | | | | | | | | | | | | | | | api's look like this: ModuleProvider *getBytecodeModuleProvider( const std::string &Filename, ///< Name of file to be read BCDecompressor_t *BCDC = Compressor::decompressToNewBuffer, std::string* ErrMsg = 0, ///< Optional error message holder BytecodeHandler* H = 0 ///< Optional handler for reader events ); This is ugly, but allows a client to say: getBytecodeModuleProvider("foo", 0); If they do this, there is no dependency on the compression libraries, saving codesize. llvm-svn: 34012
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-301-1/+1
| | | | | | confusion with external linkage types. llvm-svn: 33663
* make all llvm tools call llvm_shutdown when they exit, static'ify some stuff.Chris Lattner2006-12-061-14/+16
| | | | | | With this change, I can now move -stats to print when llvm_shutdown is called. llvm-svn: 32250
* no need to check readability hereChris Lattner2006-08-011-1/+1
| | | | llvm-svn: 29449
* Finish removal of EH usage from the Archive library. The REQUIRES_EH flagReid Spencer2006-07-071-1/+2
| | | | | | | in lib/Bytecode/Archive/Makefile is now removed. One small step closer to a smaller LLVM. llvm-svn: 29067
OpenPOWER on IntegriCloud