summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/MachOObjectFile.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [Object]David Meyer2012-03-091-1/+1
| | | | | | Make Binary::TypeID more granular, to distinguish between ELF 32/64 little/big llvm-svn: 152435
* [Object]David Meyer2012-03-011-0/+5
| | | | | | Add ObjectFile::getLoadName() for retrieving the soname/installname of a shared object. llvm-svn: 151845
* [Object]David Meyer2012-03-011-0/+21
| | | | | | | | | * Add begin_dynamic_table() / end_dynamic_table() private interface to ELFObjectFile. * Add begin_libraries_needed() / end_libraries_needed() interface to ObjectFile, for grabbing the list of needed libraries for a shared object or dynamic executable. * Implement this new interface completely for ELF, leave stubs for COFF and MachO. * Add 'llvm-readobj' tool for dumping ObjectFile information. llvm-svn: 151785
* [Object] Add symbol attribute flags: ST_ThreadLocal, ST_Common, and ↵David Meyer2012-02-291-2/+7
| | | | | | | | | ST_Undefined. Implement these completely for ELF. Rename ST_External to ST_Unknown, and slightly change its semantics. It now only indicates that the symbol's type is unknown, not that the symbol is undefined. (For that, use ST_Undefined). llvm-svn: 151696
* In the ObjectFile interface, replace isInternal(), isAbsolute(), isGlobal(), ↵David Meyer2012-02-281-43/+17
| | | | | | 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-0/+9
| | | | | | | | Add -D option to llvm-nm to dump dynamic symbols. Patch by David Meyer. llvm-svn: 151600
* Fixed ObjectFile functions:Danil Malyshev2011-11-291-11/+86
| | | | | | | | | | | - 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-72/+11
| | | | | | | | | | | | | 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-11/+72
| | | | | | | | | | | - 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
* If we're searching for a symbol reference to pretty-print a scattered ↵Owen Anderson2011-10-271-0/+18
| | | | | | relocation address, and we don't find a symbol table entry, try section begin addresses as well. llvm-svn: 143151
* Fix pretty printing of i386 local sect diff relocations, TLV relocations, ↵Owen Anderson2011-10-271-7/+50
| | | | | | and x86_64 TLV relocations in MachO. llvm-svn: 143140
* Add support for scattered relocations to the MachO relocatation pretty printer.Owen Anderson2011-10-261-86/+144
| | | | llvm-svn: 143051
* The order of the two symbol listings in a Macho x86_64 subtractor relocation ↵Owen Anderson2011-10-261-1/+3
| | | | | | is reversed from what seems intuitive to me. llvm-svn: 143035
* Include the full 64 bits of relocation data in the type info for MachO ↵Owen Anderson2011-10-261-1/+3
| | | | | | relocations, so that we can recognize scattered relocations. llvm-svn: 143033
* Expand relocation type field to 64 bits. MachO scattered relocations ↵Owen Anderson2011-10-261-1/+1
| | | | | | require 33 bits of type info. llvm-svn: 143032
* Improve pretty printing of GOT relocations in MachO on x86_64.Owen Anderson2011-10-261-0/+7
| | | | llvm-svn: 143031
* Remove unused variable.Eric Christopher2011-10-261-1/+0
| | | | llvm-svn: 143011
* Remove extraneous printing of "-PC".Owen Anderson2011-10-251-1/+0
| | | | llvm-svn: 142970
* Add support for the notion of "hidden" relocations. On MachO, these are ↵Owen Anderson2011-10-251-0/+32
| | | | | | | | relocation entries that are used as additional information for other, real relocations, rather than being relocations themselves. I'm not familiar enough with ELF or COFF to know if they should have any relocations marked hidden. llvm-svn: 142961
* Teach the MachO relocation pretty-printer to interpret ARM half-relocations.Owen Anderson2011-10-251-42/+104
| | | | llvm-svn: 142938
* More fixes and improvements to MachO relocation pretty-printing, particular ↵Owen Anderson2011-10-241-31/+127
| | | | | | for x86 and x86_64 relocations with addends. llvm-svn: 142875
* Get relocation parsing/dumping to a mostly-working state for MachO files.Owen Anderson2011-10-241-6/+127
| | | | llvm-svn: 142852
* Stub out some of the MachO relocation decoding hooks.Owen Anderson2011-10-241-0/+4
| | | | llvm-svn: 142840
* STABS symbols are debug symbols.Owen Anderson2011-10-211-1/+3
| | | | llvm-svn: 142673
* Object: Add isSymbolAbsolute and getSymbolSection.Michael J. Spencer2011-10-171-0/+37
| | | | llvm-svn: 142317
* Object: Add isSymbolWeak.Michael J. Spencer2011-10-171-0/+14
| | | | llvm-svn: 142316
* Object: Fix redundant name.Michael J. Spencer2011-10-171-2/+2
| | | | llvm-svn: 142238
* The VMAs stored in the symbol table of a MachO file are absolute addresses, ↵Owen Anderson2011-10-121-9/+9
| | | | | | not offsets from the section. llvm-svn: 141828
* Don't label a STAB debugging symbol as a function symbol.Owen Anderson2011-10-121-0/+5
| | | | llvm-svn: 141824
* sectionContainsSymbol needs to be based on VMA's rather than section indices ↵Owen Anderson2011-10-121-2/+17
| | | | | | to properly account for files with segment load commands that contain no sections. llvm-svn: 141822
* Section indices in MachO symbol tables begin at 1, not 0.Owen Anderson2011-10-121-1/+1
| | | | llvm-svn: 141815
* Expose MachOObjectFile externally, like we do for COFF. First step in ↵Owen Anderson2011-10-111-80/+3
| | | | | | reducing the amount of special-purpose code needed for llvm-objdump. llvm-svn: 141684
* Fix warning.Michael J. Spencer2011-10-101-2/+2
| | | | llvm-svn: 141597
* Object: add getSectionAlignment.Michael J. Spencer2011-10-101-0/+15
| | | | llvm-svn: 141581
* Change relocation API to be per section. This time without breaking GCC.Michael J. Spencer2011-10-071-33/+49
| | | | llvm-svn: 141385
* Revert 141376 and 141377 due to breaking the build.Bill Wendling2011-10-071-49/+33
| | | | | | | | | | | | | | | | --- Reverse-merging r141377 into '.': U tools/llvm-objdump/MachODump.cpp --- Reverse-merging r141376 into '.': U include/llvm/Object/COFF.h U include/llvm/Object/ObjectFile.h U include/llvm-c/Object.h U tools/llvm-objdump/llvm-objdump.cpp U lib/Object/MachOObjectFile.cpp U lib/Object/COFFObjectFile.cpp U lib/Object/Object.cpp U lib/Object/ELFObjectFile.cpp llvm-svn: 141379
* Change relocation API to be per section.Michael J. Spencer2011-10-071-33/+49
| | | | llvm-svn: 141376
* Object: Add isSection{Data,BSS}.Michael J. Spencer2011-09-281-0/+16
| | | | llvm-svn: 140721
* Object: make the following changes into SymbolRefBenjamin Kramer2011-09-141-1/+64
| | | | | | | | | | | - 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
* Remove dead code.Benjamin Kramer2011-09-091-8/+0
| | | | llvm-svn: 139343
* Fix release build:Nick Lewycky2011-09-091-3/+1
| | | | | | MachOObjectFile.cpp:524: error: unused variable 'NumLoadCommands' [-Wunused-variable] llvm-svn: 139341
* Add support for relocations to ObjectFile.Benjamin Kramer2011-09-081-4/+163
| | | | | | Patch by Danil Malyshev! llvm-svn: 139314
* ObjectFile: Add a method to check whether a section contains a symbol.Benjamin Kramer2011-07-151-0/+17
| | | | | | | - No ELF or COFF implementation yet, I don't have a way to test that. Should be straightforward to add though. llvm-svn: 135288
* MachOObjectFile: Get symbol functions ready for 64 bit.Benjamin Kramer2011-07-151-13/+58
| | | | llvm-svn: 135282
* Output MachO section names in the form SEGMENT,section.Benjamin Kramer2011-07-151-2/+2
| | | | llvm-svn: 135231
* Add support for 64 bit objects to MachOObjectFile.Benjamin Kramer2011-07-151-21/+77
| | | | | | - I don't see a better way than duplicating all the code. llvm-svn: 135229
* MachOObjectFile: Change isSectionText to return true for sections named ↵Benjamin Kramer2011-07-151-4/+3
| | | | | | text, not for load commands name __TEXT (which isn't the case in actual object files) llvm-svn: 135228
* Object: Add proper error handling.Michael J. Spencer2011-06-251-41/+65
| | | | llvm-svn: 133872
* Make Binary the parent of ObjectFile and update children to new interface.Michael J. Spencer2011-06-251-3/+4
| | | | llvm-svn: 133870
* Revert the last two commits in the series. r132911, r132912.Michael J. Spencer2011-06-131-4/+3
| | | | llvm-svn: 132913
OpenPOWER on IntegriCloud