aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/Object.cpp
AgeCommit message (Collapse)AuthorFilesLines
2013-06-05Handle relocations that don't point to symbols.Rafael Espindola1-4/+1
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
2013-05-01This patch breaks up Wrap.h so that it does not have to include all of Filip Pizlo1-1/+1
the things, and renames it to CBindingWrapping.h. I also moved CBindingWrapping.h into Support/. This new file just contains the macros for defining different wrap/unwrap methods. The calls to those macros, as well as any custom wrap/unwrap definitions (like for array of Values for example), are put into corresponding C++ headers. Doing this required some #include surgery, since some .cpp files relied on the fact that including Wrap.h implicitly caused the inclusion of a bunch of other things. This also now means that the C++ headers will include their corresponding C API headers; for example Value.h must include llvm-c/Core.h. I think this is harmless, since the C API headers contain just external function declarations and some C types, so I don't believe there should be any nasty dependency issues here. llvm-svn: 180881
2013-04-22Move C++ code out of the C headers and into either C++ headersEric Christopher1-0/+39
or the C++ files themselves. This enables people to use just a C compiler to interoperate with LLVM. llvm-svn: 180063
2011-11-29Fixed ObjectFile functions:Danil Malyshev1-2/+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-27Revert r145180 as it is causing test failures on all the bots.Chandler Carruth1-9/+2
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-2/+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-10-27Expose relocation accessors through the libObject C API.Owen Anderson1-0/+45
llvm-svn: 143109
2011-10-27Add relocation iterators to the libObject C API.Owen Anderson1-0/+23
llvm-svn: 143107
2011-10-21Use LLVMBool for a function that logically returns a boolean value.Owen Anderson1-1/+1
llvm-svn: 142683
2011-10-21Bind libObject API for obtaining the section containing a Symbol.Owen Anderson1-0/+6
llvm-svn: 142667
2011-10-21Expand the coverage of the libObject C bindings to include more SectionRef ↵Owen Anderson1-0/+69
accessors as well as Symbol iterators. llvm-svn: 142661
2011-10-07Change relocation API to be per section. This time without breaking GCC.Michael J. Spencer1-2/+2
llvm-svn: 141385
2011-10-07Revert 141376 and 141377 due to breaking the build.Bill Wendling1-2/+2
--- 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-2/+2
llvm-svn: 141376
2011-06-25Object: Add proper error handling.Michael J. Spencer1-6/+15
llvm-svn: 133872
2011-04-03Move Object.cpp out of VMCore and into Object.Eric Christopher1-0/+59
llvm-svn: 128800