aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/COFFObjectFile.cpp
AgeCommit message (Collapse)AuthorFilesLines
2012-03-19[Object/COFF]: Expose getSectionContents.Michael J. Spencer1-10/+19
llvm-svn: 153051
2012-03-19[Object/COFF]: Expose getSectionName.Michael J. Spencer1-19/+24
Also add some documentation. llvm-svn: 153050
2012-03-15Fix bug found by warning.Michael J. Spencer1-1/+2
llvm-svn: 152812
2012-03-09[Object]David Meyer1-1/+1
Make Binary::TypeID more granular, to distinguish between ELF 32/64 little/big llvm-svn: 152435
2012-03-01[Object]David Meyer1-0/+6
Add ObjectFile::getLoadName() for retrieving the soname/installname of a shared object. llvm-svn: 151845
2012-03-01[Object]David Meyer1-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
2012-02-29[Object] Add symbol attribute flags: ST_ThreadLocal, ST_Common, and ↵David Meyer1-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
2012-02-28In the ObjectFile interface, replace isInternal(), isAbsolute(), isGlobal(), ↵David Meyer1-22/+15
and isWeak(), with a bitset of flags. llvm-svn: 151670
2012-02-28[Object] Add {begin,end}_dynamic_symbols stubs and implementation for ELF.Michael J. Spencer1-0/+10
Add -D option to llvm-nm to dump dynamic symbols. Patch by David Meyer. llvm-svn: 151600
2011-11-29Fixed ObjectFile functions:Danil Malyshev1-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
2011-11-28Fix some possible gcc-4.2 may be used uninitialized warnings.Daniel Dunbar1-2/+2
llvm-svn: 145292
2011-11-27Revert r145180 as it is causing test failures on all the bots.Chandler Carruth1-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
2011-11-27Fixed ObjectFile functions:Danil Malyshev1-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
2011-11-16Object/COFF: Support common symbols.Michael J. Spencer1-1/+3
llvm-svn: 144861
2011-11-08Object/COFF: Fix PE reading.Michael J. Spencer1-23/+30
llvm-svn: 144148
2011-11-02object/COFF: Properly initalize uses of DataRefImpl.Michael J. Spencer1-0/+2
llvm-svn: 143562
2011-10-26Expand relocation type field to 64 bits. MachO scattered relocations ↵Owen Anderson1-1/+1
require 33 bits of type info. llvm-svn: 143032
2011-10-18Object/COFF: Remove useless test.Michael J. Spencer1-1/+1
llvm-svn: 142408
2011-10-18Object/COFF: Change type from a struct to a uint16_t. The struct would beMichael J. Spencer1-1/+1
incorrect for bigendian systems. llvm-svn: 142403
2011-10-17Object: Add isSymbolAbsolute and getSymbolSection.Michael J. Spencer1-0/+22
llvm-svn: 142317
2011-10-17Object: Add isSymbolWeak.Michael J. Spencer1-0/+7
llvm-svn: 142316
2011-10-17Object/COFF: Expose more data in the public API.Michael J. Spencer1-16/+26
llvm-svn: 142315
2011-10-17Object: Fix redundant name.Michael J. Spencer1-1/+1
llvm-svn: 142238
2011-10-13COFF: Implement sectionContainsSymbol for relocatable files only.Michael J. Spencer1-2/+8
llvm-svn: 141884
2011-10-10Object: add getSectionAlignment.Michael J. Spencer1-0/+9
llvm-svn: 141581
2011-10-08lib/Object: Suppress warnings on gcc-4.3.4 cygwinNAKAMURA Takumi1-1/+1
llvm-svn: 141485
2011-10-07Change relocation API to be per section. This time without breaking GCC.Michael J. Spencer1-43/+115
llvm-svn: 141385
2011-10-07Revert 141376 and 141377 due to breaking the build.Bill Wendling1-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
2011-10-07Change relocation API to be per section.Michael J. Spencer1-43/+114
llvm-svn: 141376
2011-09-28Object: Add isSection{Data,BSS}.Michael J. Spencer1-0/+14
llvm-svn: 140721
2011-09-14Object: make the following changes into SymbolRefBenjamin Kramer1-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
2011-09-13Silence false positive uninitialized variable warnings from GCC.Benjamin Kramer1-3/+3
llvm-svn: 139573
2011-09-08Add support for relocations to ObjectFile.Benjamin Kramer1-2/+73
Patch by Danil Malyshev! llvm-svn: 139314
2011-07-15ObjectFile: Add a method to check whether a section contains a symbol.Benjamin Kramer1-0/+8
- No ELF or COFF implementation yet, I don't have a way to test that. Should be straightforward to add though. llvm-svn: 135288
2011-07-05Use memcmp.Benjamin Kramer1-3/+1
llvm-svn: 134439
2011-07-05Really fix typo :-(Rafael Espindola1-1/+1
llvm-svn: 134436
2011-07-05Fix typo.Rafael Espindola1-2/+2
llvm-svn: 134433
2011-07-05Compare all 4 bytes of the header.Rafael Espindola1-2/+3
llvm-svn: 134427
2011-07-05Fix warnings.Michael J. Spencer1-3/+3
llvm-svn: 134408
2011-06-25Object: Add proper error handling.Michael J. Spencer1-83/+243
llvm-svn: 133872
2011-06-25Make Binary the parent of ObjectFile and update children to new interface.Michael J. Spencer1-114/+14
llvm-svn: 133870
2011-06-13Revert the last two commits in the series. r132911, r132912.Michael J. Spencer1-14/+114
llvm-svn: 132913
2011-06-13Make Binary the parent of ObjectFile and update children to new interface.Michael J. Spencer1-114/+14
llvm-svn: 132911
2011-05-02Remove dead variable pointed out by GCC 4.6 warnings, and reflow this a littleNick Lewycky1-4/+1
to scope a variable more tightly per llvm coding style. No functional change. llvm-svn: 130684
2011-04-03Assorted bugfixes in object file handling:Eric Christopher1-2/+18
- Adds support for sniffing PE/COFF files on win32 (.exe and .dll) which are COFF files that have an MS-DOS compatibility stub on the front of them. - Fixes a bug in the COFFObjectFile's support for the Microsoft COFF extension for long symbol names, wherein it was attempting to parse the leading '/' in an extended symbol name reference as part of the integer offset. - Fixes bugs in COFFObjectFile and ELFObjectFile wherein section and symbol iterators were being returned with uninitialized bytes; the type DataRefImpl is a union between 2 32-bit words (d.a and d.b) and a single intptr_t word (p). Only p was being initialized, so in 32-bit builds the result would be iterators with random upper 32-bit words in their DataRefImpls. This caused random failures when seeking around in object files. Patch by Graydon Hoare! llvm-svn: 128799
2011-01-21Object: Fix type punned pointer issues by making DataRefImpl a union and ↵Michael J. Spencer1-23/+28
using intptr_t. llvm-svn: 123962
2011-01-20Object: Add COFF Support.Michael J. Spencer1-0/+370
llvm-svn: 123895