summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/Object.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change the begin and end methods in ObjectFile to match the style guide.Rafael Espindola2014-02-101-6/+6
| | | | llvm-svn: 201108
* Simplify the handling of iterators in ObjectFile.Rafael Espindola2014-01-301-10/+3
| | | | | | | | | | | | None of the object file formats reported error on iterator increment. In retrospect, that is not too surprising: no object format stores symbols or sections in a linked list or other structure that requires chasing pointers. As a consequence, all error checking can be done on begin() and end(). This reduces the text segment of bin/llvm-readobj in my machine from 521233 to 518526 bytes. llvm-svn: 200442
* Change createObjectFile to return an ErrorOr.Rafael Espindola2014-01-221-1/+3
| | | | llvm-svn: 199776
* Re-sort all of the includes with ./utils/sort_includes.py so thatChandler Carruth2014-01-071-1/+1
| | | | | | | | | | subsequent changes are easier to review. About to fix some layering issues, and wanted to separate out the necessary churn. Also comment and sink the include of "Windows.h" in three .inc files to match the usage in Memory.inc. llvm-svn: 198685
* Handle relocations that don't point to symbols.Rafael Espindola2013-06-051-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
* This patch breaks up Wrap.h so that it does not have to include all of Filip Pizlo2013-05-011-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
* Move C++ code out of the C headers and into either C++ headersEric Christopher2013-04-221-0/+39
| | | | | | | or the C++ files themselves. This enables people to use just a C compiler to interoperate with LLVM. llvm-svn: 180063
* Fixed ObjectFile functions:Danil Malyshev2011-11-291-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
* Revert r145180 as it is causing test failures on all the bots.Chandler Carruth2011-11-271-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
* Fixed ObjectFile functions:Danil Malyshev2011-11-271-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
* Expose relocation accessors through the libObject C API.Owen Anderson2011-10-271-0/+45
| | | | llvm-svn: 143109
* Add relocation iterators to the libObject C API.Owen Anderson2011-10-271-0/+23
| | | | llvm-svn: 143107
* Use LLVMBool for a function that logically returns a boolean value.Owen Anderson2011-10-211-1/+1
| | | | llvm-svn: 142683
* Bind libObject API for obtaining the section containing a Symbol.Owen Anderson2011-10-211-0/+6
| | | | llvm-svn: 142667
* Expand the coverage of the libObject C bindings to include more SectionRef ↵Owen Anderson2011-10-211-0/+69
| | | | | | accessors as well as Symbol iterators. llvm-svn: 142661
* Change relocation API to be per section. This time without breaking GCC.Michael J. Spencer2011-10-071-2/+2
| | | | llvm-svn: 141385
* Revert 141376 and 141377 due to breaking the build.Bill Wendling2011-10-071-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
* Change relocation API to be per section.Michael J. Spencer2011-10-071-2/+2
| | | | llvm-svn: 141376
* Object: Add proper error handling.Michael J. Spencer2011-06-251-6/+15
| | | | llvm-svn: 133872
* Move Object.cpp out of VMCore and into Object.Eric Christopher2011-04-031-0/+59
llvm-svn: 128800
OpenPOWER on IntegriCloud