summaryrefslogtreecommitdiff
path: root/lib/Object
Commit message (Collapse)AuthorAge
* 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
* build: Add initial cut at LLVMBuild.txt files.Daniel Dunbar2011-11-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143634 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed unused variable.Chad Rosier2011-11-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143591 91177308-0d34-0410-b5e6-96231b3b80d8
* object/COFF: Properly initalize uses of DataRefImpl.Michael J. Spencer2011-11-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143562 91177308-0d34-0410-b5e6-96231b3b80d8
* Object/Archive: Add symbol table iteration.Michael J. Spencer2011-11-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143561 91177308-0d34-0410-b5e6-96231b3b80d8
* If we're searching for a symbol reference to pretty-print a scattered ↵Owen Anderson2011-10-27
| | | | | | relocation address, and we don't find a symbol table entry, try section begin addresses as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143151 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix pretty printing of i386 local sect diff relocations, TLV relocations, ↵Owen Anderson2011-10-27
| | | | | | and x86_64 TLV relocations in MachO. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143140 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose relocation accessors through the libObject C API.Owen Anderson2011-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143109 91177308-0d34-0410-b5e6-96231b3b80d8
* Add relocation iterators to the libObject C API.Owen Anderson2011-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143107 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for scattered relocations to the MachO relocatation pretty printer.Owen Anderson2011-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143051 91177308-0d34-0410-b5e6-96231b3b80d8
* The order of the two symbol listings in a Macho x86_64 subtractor relocation ↵Owen Anderson2011-10-26
| | | | | | is reversed from what seems intuitive to me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143035 91177308-0d34-0410-b5e6-96231b3b80d8
* Include the full 64 bits of relocation data in the type info for MachO ↵Owen Anderson2011-10-26
| | | | | | relocations, so that we can recognize scattered relocations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143033 91177308-0d34-0410-b5e6-96231b3b80d8
* Expand relocation type field to 64 bits. MachO scattered relocations ↵Owen Anderson2011-10-26
| | | | | | require 33 bits of type info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143032 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve pretty printing of GOT relocations in MachO on x86_64.Owen Anderson2011-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143031 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused variable.Eric Christopher2011-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143011 91177308-0d34-0410-b5e6-96231b3b80d8
* Object/Archive: Cleanup anon namespace.Michael J. Spencer2011-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142983 91177308-0d34-0410-b5e6-96231b3b80d8
* Object/Archive: Add BSD style long file name support and skip internal members.Michael J. Spencer2011-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142981 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extraneous printing of "-PC".Owen Anderson2011-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142970 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the notion of "hidden" relocations. On MachO, these are ↵Owen Anderson2011-10-25
| | | | | | | | | relocation entries that are used as additional information for other, real relocations, rather than being relocations themselves. I'm not familiar enough with ELF or COFF to know if they should have any relocations marked hidden. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142961 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the MachO relocation pretty-printer to interpret ARM half-relocations.Owen Anderson2011-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142938 91177308-0d34-0410-b5e6-96231b3b80d8
* More fixes and improvements to MachO relocation pretty-printing, particular ↵Owen Anderson2011-10-24
| | | | | | for x86 and x86_64 relocations with addends. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142875 91177308-0d34-0410-b5e6-96231b3b80d8
* Get relocation parsing/dumping to a mostly-working state for MachO files.Owen Anderson2011-10-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142852 91177308-0d34-0410-b5e6-96231b3b80d8
* Stub out some of the MachO relocation decoding hooks.Owen Anderson2011-10-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142840 91177308-0d34-0410-b5e6-96231b3b80d8
* Use LLVMBool for a function that logically returns a boolean value.Owen Anderson2011-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142683 91177308-0d34-0410-b5e6-96231b3b80d8
* STABS symbols are debug symbols.Owen Anderson2011-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142673 91177308-0d34-0410-b5e6-96231b3b80d8
* Bind libObject API for obtaining the section containing a Symbol.Owen Anderson2011-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142667 91177308-0d34-0410-b5e6-96231b3b80d8
* Expand the coverage of the libObject C bindings to include more SectionRef ↵Owen Anderson2011-10-21
| | | | | | accessors as well as Symbol iterators. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142661 91177308-0d34-0410-b5e6-96231b3b80d8
* Object/COFF: Remove useless test.Michael J. Spencer2011-10-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142408 91177308-0d34-0410-b5e6-96231b3b80d8
* Object/COFF: Change type from a struct to a uint16_t. The struct would beMichael J. Spencer2011-10-18
| | | | | | incorrect for bigendian systems. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142403 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: Add some types to SymbolRef::Type.Michael J. Spencer2011-10-17
| | | | | | | | Some of these can be true at the same time and there are a lot to add, so this should be turned into a bitfield. Some of the other accessors should probably be folded into this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142318 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: Add isSymbolAbsolute and getSymbolSection.Michael J. Spencer2011-10-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142317 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: Add isSymbolWeak.Michael J. Spencer2011-10-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142316 91177308-0d34-0410-b5e6-96231b3b80d8
* Object/COFF: Expose more data in the public API.Michael J. Spencer2011-10-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142315 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: Implement casting for concrete classes.Michael J. Spencer2011-10-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142314 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: Fix redundant name.Michael J. Spencer2011-10-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142238 91177308-0d34-0410-b5e6-96231b3b80d8
* ELF: Fix the section that relocations apply to. Add test to verify. Patch by ↵Michael J. Spencer2011-10-13
| | | | | | Danil Malyshev! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141901 91177308-0d34-0410-b5e6-96231b3b80d8
* COFF: Implement sectionContainsSymbol for relocatable files only.Michael J. Spencer2011-10-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141884 91177308-0d34-0410-b5e6-96231b3b80d8
* Elf_Word is not POD! Stop using it in a DenseMap.Nick Lewycky2011-10-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141851 91177308-0d34-0410-b5e6-96231b3b80d8
* The VMAs stored in the symbol table of a MachO file are absolute addresses, ↵Owen Anderson2011-10-12
| | | | | | not offsets from the section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141828 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't label a STAB debugging symbol as a function symbol.Owen Anderson2011-10-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141824 91177308-0d34-0410-b5e6-96231b3b80d8
* sectionContainsSymbol needs to be based on VMA's rather than section indices ↵Owen Anderson2011-10-12
| | | | | | to properly account for files with segment load commands that contain no sections. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141822 91177308-0d34-0410-b5e6-96231b3b80d8
* Section indices in MachO symbol tables begin at 1, not 0.Owen Anderson2011-10-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141815 91177308-0d34-0410-b5e6-96231b3b80d8
* lib/Object/ELFObjectFile.cpp: Fix undefined behavior for ↵NAKAMURA Takumi2011-10-12
| | | | | | | | MC/ELF/many-section.s not to fail (on msvc). DenseMap::lookup(k) would return "default constructor value" when k was not met. It would be useless when value type were POD. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141774 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose MachOObjectFile externally, like we do for COFF. First step in ↵Owen Anderson2011-10-11
| | | | | | reducing the amount of special-purpose code needed for llvm-objdump. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141684 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r141605 with fixes for appropriate handling of reserved section numbersNick Lewycky2011-10-11
| | | | | | | in st_shndx fields. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141639 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for .symtab_shnidx. Unfortunately, doing this required breaking aNick Lewycky2011-10-11
| | | | | | | | layer of abstraction around SymbolRef where you can read its private SymbolPimpl member. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141636 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r141605 as it broke tests for llvm-nm.Nick Lewycky2011-10-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141614 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for reading many-section ELF files.Nick Lewycky2011-10-11
| | | | | | | | If you want to tackle adding the testcase, let me know. It's a 4.2MB ELF file and I'll be happy to mail it to you. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141605 91177308-0d34-0410-b5e6-96231b3b80d8