summaryrefslogtreecommitdiff
path: root/lib/Object
Commit message (Collapse)AuthorAge
* 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
* Make Binary the parent of ObjectFile and update children to new interface.Michael J. Spencer2011-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133870 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Binary class. This is a cleaner parent than ObjectFile.Michael J. Spencer2011-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133869 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Object/Error.Michael J. Spencer2011-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133868 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r132910 and r132909 on behalf of Michael. They didn't build with clang.Benjamin Kramer2011-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132914 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert the last two commits in the series. r132911, r132912.Michael J. Spencer2011-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132913 91177308-0d34-0410-b5e6-96231b3b80d8
* Make Binary the parent of ObjectFile and update children to new interface.Michael J. Spencer2011-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132911 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Binary class. This is a cleaner parent than ObjectFile.Michael J. Spencer2011-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132910 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Object/Error.Michael J. Spencer2011-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132909 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix spelling and sort CMakeLists.txt.Michael J. Spencer2011-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132908 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead variable pointed out by GCC 4.6 warnings, and reflow this a littleNick Lewycky2011-05-02
| | | | | | | to scope a variable more tightly per llvm coding style. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130684 91177308-0d34-0410-b5e6-96231b3b80d8
* Use enums for constant values.Eric Christopher2011-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129984 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the file format strings a little prettier for mach-o.Eric Christopher2011-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129980 91177308-0d34-0410-b5e6-96231b3b80d8
* Add MachOObjectFile.cpp to cmake.Eric Christopher2011-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129978 91177308-0d34-0410-b5e6-96231b3b80d8
* Hook in mach-o object files into Object interface.Eric Christopher2011-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129976 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an ObjectFile implementation for mach-o.Eric Christopher2011-04-22
| | | | | | | Patch by Patrick Walton! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129974 91177308-0d34-0410-b5e6-96231b3b80d8
* Start migrating mach-o dumping facilities to the object file out of aEric Christopher2011-04-03
| | | | | | | separate executable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128801 91177308-0d34-0410-b5e6-96231b3b80d8
* Move Object.cpp out of VMCore and into Object.Eric Christopher2011-04-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128800 91177308-0d34-0410-b5e6-96231b3b80d8
* Assorted bugfixes in object file handling:Eric Christopher2011-04-03
| | | | | | | | | | | | | | | | | | | | | | | | | - Adds support for sniffing PE/COFF files on win32 (.exe and .dll) which are COFF files that have an MS-DOS compatibility stub on the front of them. - Fixes a bug in the COFFObjectFile's support for the Microsoft COFF extension for long symbol names, wherein it was attempting to parse the leading '/' in an extended symbol name reference as part of the integer offset. - Fixes bugs in COFFObjectFile and ELFObjectFile wherein section and symbol iterators were being returned with uninitialized bytes; the type DataRefImpl is a union between 2 32-bit words (d.a and d.b) and a single intptr_t word (p). Only p was being initialized, so in 32-bit builds the result would be iterators with random upper 32-bit words in their DataRefImpls. This caused random failures when seeking around in object files. Patch by Graydon Hoare! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128799 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: Fix type punned pointer issues by making DataRefImpl a union and ↵Michael J. Spencer2011-01-21
| | | | | | using intptr_t. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123962 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: Add ELF support.Michael J. Spencer2011-01-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123896 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: Add COFF Support.Michael J. Spencer2011-01-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123895 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix mismatched new[]/delete.Benjamin Kramer2010-12-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122053 91177308-0d34-0410-b5e6-96231b3b80d8
* MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> ↵Michael J. Spencer2010-12-16
| | | | | | via an out parm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121958 91177308-0d34-0410-b5e6-96231b3b80d8
* Mach-O: Tweak field name.Daniel Dunbar2010-12-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121465 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with ↵Michael J. Spencer2010-12-09
| | | | | | error_code &ec. And fix clients. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121379 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge System into Support.Michael J. Spencer2010-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
* macho-dump: Add support for --dump-section-data and tweak a few format strings.Daniel Dunbar2010-11-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120219 91177308-0d34-0410-b5e6-96231b3b80d8
* macho-dump: Add support for dumping symbol table entries.Daniel Dunbar2010-11-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120218 91177308-0d34-0410-b5e6-96231b3b80d8