summaryrefslogtreecommitdiff
path: root/lib/Object
Commit message (Collapse)AuthorAge
* 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
* Fix warning.Michael J. Spencer2011-10-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141597 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: add getSectionAlignment.Michael J. Spencer2011-10-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141581 91177308-0d34-0410-b5e6-96231b3b80d8
* lib/Object: Suppress warnings on gcc-4.3.4 cygwinNAKAMURA Takumi2011-10-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141485 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: Add support for opening stdin.Michael J. Spencer2011-10-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141449 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: constize Archive.Michael J. Spencer2011-10-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141448 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix GCC again.Michael J. Spencer2011-10-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141389 91177308-0d34-0410-b5e6-96231b3b80d8
* Change relocation API to be per section. This time without breaking GCC.Michael J. Spencer2011-10-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141385 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 141376 and 141377 due to breaking the build.Bill Wendling2011-10-07
| | | | | | | | | | | | | | | | | | --- 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141379 91177308-0d34-0410-b5e6-96231b3b80d8
* Change relocation API to be per section.Michael J. Spencer2011-10-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141376 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: Add isSection{Data,BSS}.Michael J. Spencer2011-09-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140721 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: Add archive support.Michael J. Spencer2011-09-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140626 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: make the following changes into SymbolRefBenjamin Kramer2011-09-14
| | | | | | | | | | | - Add enum SymbolType and function getSymbolType() - Add function isGlobal() - it's returns true for symbols that can be used in another objects, such as library functions. - Rename function getAddress() to getOffset() and add new function getAddress(), because currently getAddress() returns section offset of symbol first byte. new getAddress() return symbol address. - Change usage SymbolRef::getAddress() to getOffset() in tools/llvm-nm and tools/llvm-objdump. Patch by Danil Malyshev! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139683 91177308-0d34-0410-b5e6-96231b3b80d8
* ObjectFile: Add support for mach-o-style dSYM companion files.Benjamin Kramer2011-09-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139676 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence false positive uninitialized variable warnings from GCC.Benjamin Kramer2011-09-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139573 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code.Benjamin Kramer2011-09-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139343 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix release build:Nick Lewycky2011-09-09
| | | | | | | MachOObjectFile.cpp:524: error: unused variable 'NumLoadCommands' [-Wunused-variable] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139341 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for relocations to ObjectFile.Benjamin Kramer2011-09-08
| | | | | | Patch by Danil Malyshev! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139314 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach macho-dump to dump the uleb128s referred to by linkedit_data segments.Benjamin Kramer2011-08-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138836 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach macho-dump how to dump linkedit_data load commands.Benjamin Kramer2011-08-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138807 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite the CMake build to use explicit dependencies between libraries,Chandler Carruth2011-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specified in the same file that the library itself is created. This is more idiomatic for CMake builds, and also allows us to correctly specify dependencies that are missed due to bugs in the GenLibDeps perl script, or change from compiler to compiler. On Linux, this returns CMake to a place where it can relably rebuild several targets of LLVM. I have tried not to change the dependencies from the ones in the current auto-generated file. The only places I've really diverged are in places where I was seeing link failures, and added a dependency. The goal of this patch is not to start changing the dependencies, merely to move them into the correct location, and an explicit form that we can control and change when necessary. This also removes a serialization point in the build because we don't have to scan all the libraries before we begin building various tools. We no longer have a step of the build that regenerates a file inside the source tree. A few other associated cleanups fall out of this. This isn't really finished yet though. After talking to dgregor he urged switching to a single CMake macro to construct libraries with both sources and dependencies in the arguments. Migrating from the two macros to that style will be a follow-up patch. Also, llvm-config is still generated with GenLibDeps.pl, which means it still has slightly buggy dependencies. The internal CMake 'llvm-config-like' macro uses the correct explicitly specified dependencies however. A future patch will switch llvm-config generation (when using CMake) to be based on these deps as well. This may well break Windows. I'm getting a machine set up now to dig into any failures there. If anyone can chime in with problems they see or ideas of how to solve them for Windows, much appreciated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136433 91177308-0d34-0410-b5e6-96231b3b80d8
* ObjectFile: Add a method to check whether a section contains a symbol.Benjamin Kramer2011-07-15
| | | | | | | - No ELF or COFF implementation yet, I don't have a way to test that. Should be straightforward to add though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135288 91177308-0d34-0410-b5e6-96231b3b80d8
* MachOObjectFile: Get symbol functions ready for 64 bit.Benjamin Kramer2011-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135282 91177308-0d34-0410-b5e6-96231b3b80d8
* Output MachO section names in the form SEGMENT,section.Benjamin Kramer2011-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135231 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for 64 bit objects to MachOObjectFile.Benjamin Kramer2011-07-15
| | | | | | - I don't see a better way than duplicating all the code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135229 91177308-0d34-0410-b5e6-96231b3b80d8
* MachOObjectFile: Change isSectionText to return true for sections named ↵Benjamin Kramer2011-07-15
| | | | | | text, not for load commands name __TEXT (which isn't the case in actual object files) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135228 91177308-0d34-0410-b5e6-96231b3b80d8
* Use memcmp.Benjamin Kramer2011-07-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134439 91177308-0d34-0410-b5e6-96231b3b80d8
* Really fix typo :-(Rafael Espindola2011-07-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134436 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo.Rafael Espindola2011-07-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134433 91177308-0d34-0410-b5e6-96231b3b80d8
* Compare all 4 bytes of the header.Rafael Espindola2011-07-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134427 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix warnings.Michael J. Spencer2011-07-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134408 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: Add proper error handling.Michael J. Spencer2011-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133872 91177308-0d34-0410-b5e6-96231b3b80d8