Guy Benyei
83c74e9fad
Add static cast to unsigned char whenever a character classification function is called with a signed char argument, in order to avoid assertions in Windows Debug configuration.
...
llvm-svn: 175006
2013-02-12 21:21:59 +00:00
Tim Northover
4f223bf7c4
Add interface for querying object files for symbol values.
...
Currently only implemented for ELF.
Patch by Amara Emerson.
llvm-svn: 166918
2012-10-29 10:47:00 +00:00
Andrew Kaylor
b96a320a2e
Cosmetic changes
...
llvm-svn: 165588
2012-10-10 01:45:52 +00:00
Andrew Kaylor
3f31fa05d5
This patch adds new functions to the SectionRef and ObjectFile interfaces to 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
2012-10-10 01:41:33 +00:00
Marshall Clow
d3e2a76ca4
Added accessors for getting coff_relocation info
...
llvm-svn: 158675
2012-06-18 19:47:16 +00:00
Marshall Clow
bfb85e676c
Had a closing brace inside an #ifdef -- oops!
...
llvm-svn: 158485
2012-06-15 01:15:47 +00:00
Marshall Clow
71757ef3ed
Adding acessors to COFFObjectFile so that clients can get at the (non-generic) bits
...
llvm-svn: 158484
2012-06-15 01:08:25 +00:00
Preston Gurd
2138ef6d3d
This patch improves the MCJIT runtime dynamic loader by adding new handling
...
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
2012-04-12 20:13:57 +00:00
Danil Malyshev
549515e128
Add a constructor for DataRefImpl and remove excess initialization.
...
llvm-svn: 154371
2012-04-10 01:54:44 +00:00
Michael J. Spencer
9da9e6937f
[Object/COFF]: Expose getSectionContents.
...
llvm-svn: 153051
2012-03-19 20:27:37 +00:00
Michael J. Spencer
53c2d5477a
[Object/COFF]: Expose getSectionName.
...
Also add some documentation.
llvm-svn: 153050
2012-03-19 20:27:15 +00:00
Michael J. Spencer
7a89e0cc01
Fix bug found by warning.
...
llvm-svn: 152812
2012-03-15 17:49:29 +00:00
David Meyer
d53422d1a7
[Object]
...
Make Binary::TypeID more granular, to distinguish between ELF 32/64 little/big
llvm-svn: 152435
2012-03-09 20:41:57 +00:00
David Meyer
c429b80da1
[Object]
...
Add ObjectFile::getLoadName() for retrieving the soname/installname of a shared object.
llvm-svn: 151845
2012-03-01 22:19:54 +00:00
David Meyer
2fc34c5f84
[Object]
...
* 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-03-01 01:36:50 +00:00
David Meyer
7e4b976c36
[Object] Add symbol attribute flags: ST_ThreadLocal, ST_Common, and 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-29 02:11:55 +00:00
David Meyer
1df4b84db4
In the ObjectFile interface, replace isInternal(), isAbsolute(), isGlobal(), and isWeak(), with a bitset of flags.
...
llvm-svn: 151670
2012-02-28 23:47:53 +00:00
Michael J. Spencer
8c4729fd44
[Object] Add {begin,end}_dynamic_symbols stubs and implementation for ELF.
...
Add -D option to llvm-nm to dump dynamic symbols.
Patch by David Meyer.
llvm-svn: 151600
2012-02-28 00:40:37 +00:00
Danil Malyshev
cbe72fc959
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: 145408
2011-11-29 17:40:10 +00:00
Daniel Dunbar
9339d4556e
Fix some possible gcc-4.2 may be used uninitialized warnings.
...
llvm-svn: 145292
2011-11-28 22:19:32 +00:00
Chandler Carruth
37ab257b88
Revert r145180 as it is causing test failures on all the bots.
...
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-27 10:37:47 +00:00
Danil Malyshev
2631f93f7d
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: 145180
2011-11-27 10:12:52 +00:00
Michael J. Spencer
d27d51fbaf
Object/COFF: Support common symbols.
...
llvm-svn: 144861
2011-11-16 23:36:12 +00:00
Michael J. Spencer
d5930ca99d
Object/COFF: Fix PE reading.
...
llvm-svn: 144148
2011-11-08 23:34:07 +00:00
Michael J. Spencer
d0f5b0e194
object/COFF: Properly initalize uses of DataRefImpl.
...
llvm-svn: 143562
2011-11-02 19:33:26 +00:00