summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/COFFObjectFile.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "llvm-objdump: Dump COFF import table if -private-headers option is ↵Rui Ueyama2013-09-271-166/+30
| | | | | | | | given." This reverts commit r191472 because it's failing on BE machine. llvm-svn: 191480
* llvm-objdump: Dump COFF import table if -private-headers option is given.Rui Ueyama2013-09-271-30/+166
| | | | | | | | | | | | | | | | This is a patch to add capability to llvm-objdump to dump COFF Import Table entries, so that we can write tests for LLD checking Import Table contents. llvm-objdump did not print anything but just file name if the format is COFF and -private-headers option is given. This is a patch adds capability for dumping DLL Import Table, which is specific to the COFF format. In this patch I defined a new iterator to iterate over import table entries. Also added a few functions to COFFObjectFile.cpp to access fields of the entry. Differential Revision: http://llvm-reviews.chandlerc.com/D1719 llvm-svn: 191472
* Retry submitting r186623: COFFDumper: Dump data directory entries.Rui Ueyama2013-07-191-37/+49
| | | | | | | | The original change was rolled back in r186627 because of test failures on the big endian machine. I believe I fixed the issue so re-submitting. llvm-svn: 186734
* Revert "COFFDumper: Dump data directory entries."Rui Ueyama2013-07-181-46/+36
| | | | | | Because it broke s390x and ppc64-linux buildbots. This reverts commit r186623. llvm-svn: 186627
* COFFDumper: Dump data directory entries.Rui Ueyama2013-07-181-36/+46
| | | | | | | | | | | | | | | | | Summary: Dump optional data directory entries in the PE/COFF header, so that we can test the output of LLD linker. This patch updates the test binary file, but the source of the binary is the same. I just re-linked the file. I don't know how the previous file was linked, but the previous file did not have any data directory entries for some reason. Reviewers: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1148 llvm-svn: 186623
* readobj: Dump PE/COFF optional records.Rui Ueyama2013-06-121-36/+63
| | | | | | | | | | | | These records are mandatory for executables and are used by the loader. Reviewers: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D939 llvm-svn: 183852
* Handle relocations that don't point to symbols.Rafael Espindola2013-06-051-4/+2
| | | | | | | | In ELF (as in MachO), not all relocations point to symbols. Represent this properly by using a symbol_iterator instead of a SymbolRef. Update llvm-readobj ELF's dumper to handle relocatios without symbols. llvm-svn: 183284
* Change getRelocationAdditionalInfo to be ELF only.Rafael Espindola2013-05-091-5/+0
| | | | | | | It was only implemented for ELF where it collected the Addend, so this patch also renames it to getRelocationAddend. llvm-svn: 181502
* Clarify getRelocationAddress x getRelocationOffset a bit.Rafael Espindola2013-04-251-2/+1
| | | | | | | | | | getRelocationAddress is for dynamic libraries and executables, getRelocationOffset for relocatable objects. Mark the getRelocationAddress of COFF and MachO as not implemented yet. Add a test of ELF's. llvm-readobj -r now prints the same values as readelf -r. llvm-svn: 180259
* Remove unused argument.Rafael Espindola2013-04-071-1/+1
| | | | llvm-svn: 178987
* Add static cast to unsigned char whenever a character classification ↵Guy Benyei2013-02-121-1/+1
| | | | | | function is called with a signed char argument, in order to avoid assertions in Windows Debug configuration. llvm-svn: 175006
* Add interface for querying object files for symbol values.Tim Northover2012-10-291-0/+5
| | | | | | | | Currently only implemented for ELF. Patch by Amara Emerson. llvm-svn: 166918
* Cosmetic changesAndrew Kaylor2012-10-101-1/+1
| | | | llvm-svn: 165588
* This patch adds new functions to the SectionRef and ObjectFile interfaces to ↵Andrew Kaylor2012-10-101-0/+7
| | | | | | | | determine whether or not a section is meant to be read-only. These functions will be used by the MCJIT RuntimeDyld to give hints to the memory manager during the object loading process in a future patch. Patch by Ashok Thirumurthi. llvm-svn: 165586
* Added accessors for getting coff_relocation infoMarshall Clow2012-06-181-0/+5
| | | | llvm-svn: 158675
* Had a closing brace inside an #ifdef -- oops!Marshall Clow2012-06-151-1/+1
| | | | llvm-svn: 158485
* Adding acessors to COFFObjectFile so that clients can get at the ↵Marshall Clow2012-06-151-0/+31
| | | | | | (non-generic) bits llvm-svn: 158484
* This patch improves the MCJIT runtime dynamic loader by adding new handlingPreston Gurd2012-04-121-0/+21
| | | | | | | | | | of zero-initialized sections, virtual sections and common symbols and preventing the loading of sections which are not required for execution such as debug information. Patch by Andy Kaylor! llvm-svn: 154610
* Add a constructor for DataRefImpl and remove excess initialization.Danil Malyshev2012-04-101-9/+0
| | | | llvm-svn: 154371
* [Object/COFF]: Expose getSectionContents.Michael J. Spencer2012-03-191-10/+19
| | | | llvm-svn: 153051
* [Object/COFF]: Expose getSectionName.Michael J. Spencer2012-03-191-19/+24
| | | | | | Also add some documentation. llvm-svn: 153050
* Fix bug found by warning.Michael J. Spencer2012-03-151-1/+2
| | | | llvm-svn: 152812
* [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/+6
| | | | | | Add ObjectFile::getLoadName() for retrieving the soname/installname of a shared object. llvm-svn: 151845
* [Object]David Meyer2012-03-011-0/+20
| | | | | | | | | * 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/+6
| | | | | | | | | 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-22/+15
| | | | | | 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/+10
| | | | | | | | Add -D option to llvm-nm to dump dynamic symbols. Patch by David Meyer. llvm-svn: 151600
* Fixed ObjectFile functions:Danil Malyshev2011-11-291-6/+9
| | | | | | | | | | | - 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
* Fix some possible gcc-4.2 may be used uninitialized warnings.Daniel Dunbar2011-11-281-2/+2
| | | | llvm-svn: 145292
* Revert r145180 as it is causing test failures on all the bots.Chandler Carruth2011-11-271-9/+6
| | | | | | | | | | | | | 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-6/+9
| | | | | | | | | | | - 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
* Object/COFF: Support common symbols.Michael J. Spencer2011-11-161-1/+3
| | | | llvm-svn: 144861
* Object/COFF: Fix PE reading.Michael J. Spencer2011-11-081-23/+30
| | | | llvm-svn: 144148
* object/COFF: Properly initalize uses of DataRefImpl.Michael J. Spencer2011-11-021-0/+2
| | | | llvm-svn: 143562
* 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
* Object/COFF: Remove useless test.Michael J. Spencer2011-10-181-1/+1
| | | | llvm-svn: 142408
* Object/COFF: Change type from a struct to a uint16_t. The struct would beMichael J. Spencer2011-10-181-1/+1
| | | | | | incorrect for bigendian systems. llvm-svn: 142403
* Object: Add isSymbolAbsolute and getSymbolSection.Michael J. Spencer2011-10-171-0/+22
| | | | llvm-svn: 142317
* Object: Add isSymbolWeak.Michael J. Spencer2011-10-171-0/+7
| | | | llvm-svn: 142316
* Object/COFF: Expose more data in the public API.Michael J. Spencer2011-10-171-16/+26
| | | | llvm-svn: 142315
* Object: Fix redundant name.Michael J. Spencer2011-10-171-1/+1
| | | | llvm-svn: 142238
* COFF: Implement sectionContainsSymbol for relocatable files only.Michael J. Spencer2011-10-131-2/+8
| | | | llvm-svn: 141884
* Object: add getSectionAlignment.Michael J. Spencer2011-10-101-0/+9
| | | | llvm-svn: 141581
* lib/Object: Suppress warnings on gcc-4.3.4 cygwinNAKAMURA Takumi2011-10-081-1/+1
| | | | llvm-svn: 141485
* Change relocation API to be per section. This time without breaking GCC.Michael J. Spencer2011-10-071-43/+115
| | | | llvm-svn: 141385
* Revert 141376 and 141377 due to breaking the build.Bill Wendling2011-10-071-114/+43
| | | | | | | | | | | | | | | | --- 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-43/+114
| | | | llvm-svn: 141376
* Object: Add isSection{Data,BSS}.Michael J. Spencer2011-09-281-0/+14
| | | | llvm-svn: 140721
* Object: make the following changes into SymbolRefBenjamin Kramer2011-09-141-1/+50
| | | | | | | | | | | - 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