summaryrefslogtreecommitdiff
path: root/lib/Object
Commit message (Collapse)AuthorAge
* s/assert/llvm_unreachable/Matt Beaumont-Gay2012-11-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167936 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix broken asserts. Also, spell 'indices' correctly.Matt Beaumont-Gay2012-11-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167894 91177308-0d34-0410-b5e6-96231b3b80d8
* [Object] Fix endianess bug by refactoring Archive::Symbol::getMember.Michael J. Spencer2012-11-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167893 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding changes to support GNU style archive library readingShankar Easwaran2012-11-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167853 91177308-0d34-0410-b5e6-96231b3b80d8
* Add interface for querying object files for symbol values.Tim Northover2012-10-29
| | | | | | | | Currently only implemented for ELF. Patch by Amara Emerson. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166918 91177308-0d34-0410-b5e6-96231b3b80d8
* Cosmetic changesAndrew Kaylor2012-10-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165588 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch adds new functions to the SectionRef and ObjectFile interfaces to ↵Andrew Kaylor2012-10-10
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165586 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting r 160419.Galina Kistanova2012-07-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160525 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed few warnings.Galina Kistanova2012-07-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160419 91177308-0d34-0410-b5e6-96231b3b80d8
* Added accessors for getting coff_relocation infoMarshall Clow2012-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158675 91177308-0d34-0410-b5e6-96231b3b80d8
* Had a closing brace inside an #ifdef -- oops!Marshall Clow2012-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158485 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding acessors to COFFObjectFile so that clients can get at the ↵Marshall Clow2012-06-15
| | | | | | (non-generic) bits git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158484 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert comments to proper Doxygen comments.Dmitri Gribenko2012-06-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158248 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark some static arrays as const.Craig Topper2012-05-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157377 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor data-in-code annotations.Jim Grosbach2012-05-18
| | | | | | | | | | | | | | | | | | | | | | Use a dedicated MachO load command to annotate data-in-code regions. This is the same format the linker produces for final executable images, allowing consistency of representation and use of introspection tools for both object and executable files. Data-in-code regions are annotated via ".data_region"/".end_data_region" directive pairs, with an optional region type. data_region_directive := ".data_region" { region_type } region_type := "jt8" | "jt16" | "jt32" | "jta32" end_data_region_directive := ".end_data_region" The previous handling of ARM-style "$d.*" labels was broken and has been removed. Specifically, it didn't handle ARM vs. Thumb mode when marking the end of the section. rdar://11459456 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157062 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the implementation of MachOObjectFile::isSectionZeroInit so it follows ↵Eli Friedman2012-05-02
| | | | | | the MachO spec. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155976 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement GDB integration for source level debugging of code JITed usingPreston Gurd2012-04-16
| | | | | | | | | | | | | | | | the MCJIT execution engine. The GDB JIT debugging integration support works by registering a loaded object image with a pre-defined function that GDB will monitor if GDB is attached. GDB integration support is implemented for ELF only at this time. This integration requires GDB version 7.0 or newer. Patch by Andy Kaylor! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154868 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused variable.Benjamin Kramer2012-04-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154661 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch improves the MCJIT runtime dynamic loader by adding new handlingPreston Gurd2012-04-12
| | | | | | | | | | | | 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! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154610 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a constructor for DataRefImpl and remove excess initialization.Danil Malyshev2012-04-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154371 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: drop bogus VMCore dependencyDylan Noblesmith2012-04-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153956 91177308-0d34-0410-b5e6-96231b3b80d8
* [Object/COFF]: Expose getSectionContents.Michael J. Spencer2012-03-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153051 91177308-0d34-0410-b5e6-96231b3b80d8
* [Object/COFF]: Expose getSectionName.Michael J. Spencer2012-03-19
| | | | | | Also add some documentation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153050 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug found by warning.Michael J. Spencer2012-03-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152812 91177308-0d34-0410-b5e6-96231b3b80d8
* [Object]David Meyer2012-03-09
| | | | | | | | | Make Binary::TypeID more granular, to distinguish between ELF 32/64 little/big git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152435 91177308-0d34-0410-b5e6-96231b3b80d8
* [Object]David Meyer2012-03-01
| | | | | | | | Add ObjectFile::getLoadName() for retrieving the soname/installname of a shared object. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151845 91177308-0d34-0410-b5e6-96231b3b80d8
* [Object]David Meyer2012-03-01
| | | | | | | | | | | * 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151785 91177308-0d34-0410-b5e6-96231b3b80d8
* [Object] Add symbol attribute flags: ST_ThreadLocal, ST_Common, and ↵David Meyer2012-02-29
| | | | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151696 91177308-0d34-0410-b5e6-96231b3b80d8
* In the ObjectFile interface, replace isInternal(), isAbsolute(), isGlobal(), ↵David Meyer2012-02-28
| | | | | | and isWeak(), with a bitset of flags. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151670 91177308-0d34-0410-b5e6-96231b3b80d8
* [Object] Add {begin,end}_dynamic_symbols stubs and implementation for ELF.Michael J. Spencer2012-02-28
| | | | | | | | Add -D option to llvm-nm to dump dynamic symbols. Patch by David Meyer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151600 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove static ctor.Benjamin Kramer2012-02-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151160 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose the ELFObjectFile class directly in the Object/ELF.h header, similarlyEli Bendersky2012-02-12
| | | | | | | | | | | | | to what's done for MachO and COFF. This allows advanced uses of the class to be implemented outside the Object library. In particular, the DyldELFObject subclass is now moved into its logical home - ExecutionEngine/RuntimeDyld. This patch was reviewed by Michael Spencer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150327 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: avoid undefined behavior when bounds-checkingDylan Noblesmith2012-02-04
| | | | | | | | | | Don't form an out of bounds pointer just to test if it would be out of bounds. Also perform the same bounds checking for all the previous mapped structures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149750 91177308-0d34-0410-b5e6-96231b3b80d8
* Sink assert-only variables into the assertsMatt Beaumont-Gay2012-01-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148849 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence warnings in -asserts buildMatt Beaumont-Gay2012-01-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148715 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing spacesEli Bendersky2012-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148654 91177308-0d34-0410-b5e6-96231b3b80d8
* Basic runtime dynamic loading capabilities added to ELFObjectFile, implementedEli Bendersky2012-01-22
| | | | | | | | | | | | | | | in a subclass named DyldELFObject. This class supports rebasing the object file it represents by re-mapping section addresses to the actual memory addresses the object was placed in. This is required for MC-JIT implementation on ELF with debugging support. Patch reviewed on llvm-commits. Developed together with Ashok Thirumurthi and Andrew Kaylor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148653 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused variables.Rafael Espindola2011-12-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147261 91177308-0d34-0410-b5e6-96231b3b80d8
* Unweaken vtables as per ↵David Blaikie2011-12-20
| | | | | | http://llvm.org/docs/CodingStandards.html#ll_virtual_anch git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146960 91177308-0d34-0410-b5e6-96231b3b80d8
* LLVMBuild: Remove trailing newline, which irked me.Daniel Dunbar2011-12-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146409 91177308-0d34-0410-b5e6-96231b3b80d8
* build/CMake: Finish removal of add_llvm_library_dependencies.Daniel Dunbar2011-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145420 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed ObjectFile functions:Danil Malyshev2011-11-29
| | | | | | | | | | | | - 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145408 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some possible gcc-4.2 may be used uninitialized warnings.Daniel Dunbar2011-11-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145292 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r145180 as it is causing test failures on all the bots.Chandler Carruth2011-11-27
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145182 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed ObjectFile functions:Danil Malyshev2011-11-27
| | | | | | | | | | | - 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145180 91177308-0d34-0410-b5e6-96231b3b80d8
* Object/COFF: Support common symbols.Michael J. Spencer2011-11-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144861 91177308-0d34-0410-b5e6-96231b3b80d8
* build: Attempt to rectify inconsistencies between CMake and LLVMBuild ↵Daniel Dunbar2011-11-12
| | | | | | | | versions of explicit dependencies. - The hope is that we have a tool/test to verify these are accurate (and tight) soon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144444 91177308-0d34-0410-b5e6-96231b3b80d8
* Object/COFF: Fix PE reading.Michael J. Spencer2011-11-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144148 91177308-0d34-0410-b5e6-96231b3b80d8
* MachOObject: Use DataExtractor's uleb parser instead of rolling our own.Benjamin Kramer2011-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143810 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify code.Benjamin Kramer2011-11-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143695 91177308-0d34-0410-b5e6-96231b3b80d8