summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-readobj
Commit message (Collapse)AuthorAgeFilesLines
...
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-065-26/+20
| | | | | | | | | | This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. llvm-svn: 203083
* Switch all uses of LLVM_OVERRIDE to just use 'override' directly.Craig Topper2014-03-023-24/+24
| | | | llvm-svn: 202621
* Change the begin and end methods in ObjectFile to match the style guide.Rafael Espindola2014-02-102-32/+32
| | | | llvm-svn: 201108
* tools: cast the right operandSaleem Abdulrasool2014-02-091-1/+1
| | | | | | Properly apply the fix intended by SVN r201032. llvm-svn: 201036
* tools: explicitly cast to avoid a warningSaleem Abdulrasool2014-02-091-1/+1
| | | | llvm-svn: 201032
* tools: handle out-of-line personality 0 decodingSaleem Abdulrasool2014-02-081-1/+1
| | | | | | | | In some cases it is possible to have a personality 0 unwinding opcodes in the extab (such as when .handlerdata is used in the assembly). Simply decode the 3 opcodes for that case. llvm-svn: 201030
* tools: fix Twine abuseSaleem Abdulrasool2014-01-301-10/+10
| | | | | | | utohexstr provides a temporary string, making it unsafe to use with the Twine interface which will not copy the string. Switch to using std::string. llvm-svn: 200457
* tools: remove unnecessary typenameSaleem Abdulrasool2014-01-301-2/+2
| | | | | | | This is acceptted by clang and gcc, but MSVC seems to balk at it. As it is unneeded, simply drop it. Fixes MSVC buildbots. llvm-svn: 200456
* tools: repair Windows buildSaleem Abdulrasool2014-01-301-2/+2
| | | | | | | | | exp2 is not available on Windows. Fortunately, we are calculating powers of 2 with expontents within the range of [4,12]. Simply use an equivalent bitshift operation to repair compilation with MSVC which does not provide this standard function. llvm-svn: 200454
* tools: add support for decoding ARM attributesSaleem Abdulrasool2014-01-308-0/+834
| | | | | | | | Enhance the ARM specific parsing support in llvm-readobj to support attributes. This allows for simpler tests to validate encoding of the build attributes as specified in the ARM ELF specification. llvm-svn: 200450
* Simplify the handling of iterators in ObjectFile.Rafael Espindola2014-01-302-65/+17
| | | | | | | | | | | | 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
* Rename IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA.Rui Ueyama2014-01-271-2/+1
| | | | | | | editbin.exe and link.exe both accepts /highentropyva option to set this bit, so doing s/VIRTUAL_ADDRESS/VA/ should make sense. llvm-svn: 200191
* COFF: Add a missing enum value for high entropy ASLR.Rui Ueyama2014-01-261-0/+2
| | | | | | | | | That bit is not documented in the PE/COFF spec published by Microsoft, so we don't know the official name of it. I named this bit IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VIRTUAL_ADDRESS because the bit is reported as "high entropy virtual address" by dumpbin.exe, llvm-svn: 200121
* llvm-readobj: add support for PE32+ (Windows 64 bit executable).Rui Ueyama2014-01-261-48/+63
| | | | | | | | | | | | PE32+ supports 64 bit address space, but the file format remains 32 bit. So its file format is pretty similar to PE32 (32 bit executable). The differences compared to PE32 are (1) the lack of "BaseOfData" field and (2) some of its data members are 64 bit. In this patch, I added a new member function to get a PE32+ Header object to COFFObjectFile class and made llvm-readobj to use it. llvm-svn: 200117
* Rename these methods to match the style guide.Rafael Espindola2014-01-211-2/+2
| | | | llvm-svn: 199751
* tools: use 64-bit print specifierSaleem Abdulrasool2014-01-211-1/+1
| | | | | | | Try to repair the ARM Cortex-A15 buildbot by using a more appropriate conversion specifier. llvm-svn: 199711
* tools: support decoding ARM EHABI opcodes in readobjSaleem Abdulrasool2014-01-211-2/+288
| | | | | | | | | | | | | | Add support to llvm-readobj to decode the actual opcodes. The ARM EHABI opcodes are a variable length instruction set that describe the operations required for properly unwinding stack frames. The primary motivation for this change is to ease the creation of tests for the ARM EHABI object emission as well as the unwinding directive handling in the ARM IAS. Thanks to Logan Chien for an extra test case! llvm-svn: 199708
* Return an ErrorOr<Binary *> from createBinary.Rafael Espindola2014-01-151-2/+3
| | | | | | | | I did write a version returning ErrorOr<OwningPtr<Binary> >, but it is too cumbersome to use without std::move. I will keep the patch locally and submit when we switch to c++11. llvm-svn: 199326
* [cleanup] Add a missing include exposed by resorting other includes.Chandler Carruth2014-01-131-0/+1
| | | | | | Should fix the build. llvm-svn: 199081
* Re-sort #include lines again, prior to moving headers around.Chandler Carruth2014-01-137-15/+4
| | | | llvm-svn: 199080
* llvm-readobj: address review comments for ARM EHABI printingSaleem Abdulrasool2014-01-091-18/+10
| | | | | | | | Rename bytecode to opcodes to make it more clear. Change an impossible case to llvm_unreachable instead. Avoid allocation of a buffer by modifying the PrintOpcodes iteration. llvm-svn: 198848
* llvm-readobj: fix endiannessSaleem Abdulrasool2014-01-091-5/+6
| | | | | | | Explicitly handle endianness to ensure that bytes are read properly on big-endian systems. llvm-svn: 198847
* Use getError and remove the error_code operator.Rafael Espindola2014-01-081-2/+2
| | | | llvm-svn: 198799
* llvm-readobj: add support for ARM EHABI unwind infoSaleem Abdulrasool2014-01-082-0/+291
| | | | | | | | | | | | | | | This adds some preliminary support for decoding ARM EHABI unwinding information. The major functionality that remains from complete support is bytecode translation. Each Unwind Index Table is printed out as a separate entity along with its section index, name, offset, and entries. Each entry lists the function address, and if possible, the name, of the function to which it corresponds. The encoding model, personality routine or index, and byte code is also listed. llvm-svn: 198734
* [Mips] Add support for DT_MIPS_RLD_MAP and DT_MIPS_PLTGOT dynamicSimon Atanasyan2014-01-051-0/+4
| | | | | | section tags to the llvm-readobj. llvm-svn: 198561
* Teach the llvm-readobj COFF dumper to dump debug line tables from object filesTimur Iskhodzhanov2013-12-193-0/+170
| | | | | | Reviewed at http://llvm-reviews.chandlerc.com/D2425 llvm-svn: 197674
* [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.NAKAMURA Takumi2013-12-101-2/+3
| | | | llvm-svn: 196908
* Add support for DT_VERxxx and DT_MIPS_xxx .dynamic section entries to theSimon Atanasyan2013-11-111-0/+22
| | | | | | | | | llvm-readobj. The patch reviewed by Michael Spencer. http://llvm-reviews.chandlerc.com/D2113 llvm-svn: 194421
* [Mips] Teach llvm-readobj to print MIPS-specific ELF program headers.Simon Atanasyan2013-10-071-21/+38
| | | | | | | The patch reviewed by Michael Spencer. http://llvm-reviews.chandlerc.com/D1846 llvm-svn: 192093
* Remove several unused variables.Rafael Espindola2013-10-012-7/+0
| | | | | | Patch by Alp Toker. llvm-svn: 191757
* ELF: Add support for the exclude section bit for gas compat.Benjamin Kramer2013-09-151-0/+1
| | | | llvm-svn: 190769
* Print string value for DT_RPATH and DT_RUNPATH.Joerg Sonnenberger2013-09-031-0/+4
| | | | llvm-svn: 189829
* Move everything depending on Object/MachOFormat.h over to Support/MachO.h.Charles Davis2013-09-011-33/+33
| | | | llvm-svn: 189728
* Revert "Fix the build broken by r189315." and "Move everything depending on ↵Charles Davis2013-08-271-33/+33
| | | | | | | | | Object/MachOFormat.h over to Support/MachO.h." This reverts commits r189319 and r189315. r189315 broke some tests on what I believe are big-endian platforms. llvm-svn: 189321
* Move everything depending on Object/MachOFormat.h over to Support/MachO.h.Charles Davis2013-08-271-33/+33
| | | | llvm-svn: 189315
* Remove byte order mark from source file.Benjamin Kramer2013-08-091-1/+1
| | | | llvm-svn: 188066
* [Object] Split the ELF interface into 3 parts.Michael J. Spencer2013-08-082-175/+134
| | | | | | | | * ELFTypes.h contains template magic for defining types based on endianess, size, and alignment. * ELFFile.h defines the ELFFile class which provides low level ELF specific access. * ELFObjectFile.h contains ELFObjectFile which uses ELFFile to implement the ObjectFile interface. llvm-svn: 188022
* Remove the mblaze backend from llvm.Rafael Espindola2013-07-251-3/+1
| | | | | | Approval in here http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/064169.html llvm-svn: 187145
* Retry submitting r186623: COFFDumper: Dump data directory entries.Rui Ueyama2013-07-191-0/+24
| | | | | | | | The original change was rolled back in r186627 because of test failures on the big endian machine. I believe I fixed the issue so re-submitting. llvm-svn: 186734
* Revert "COFFDumper: Dump data directory entries."Rui Ueyama2013-07-181-24/+0
| | | | | | Because it broke s390x and ppc64-linux buildbots. This reverts commit r186623. llvm-svn: 186627
* COFFDumper: Dump data directory entries.Rui Ueyama2013-07-181-0/+24
| | | | | | | | | | | | | | | | | Summary: Dump optional data directory entries in the PE/COFF header, so that we can test the output of LLD linker. This patch updates the test binary file, but the source of the binary is the same. I just re-linked the file. I don't know how the previous file was linked, but the previous file did not have any data directory entries for some reason. Reviewers: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1148 llvm-svn: 186623
* COFFDumper: Print uint64_t with the right format string.Benjamin Kramer2013-07-061-3/+3
| | | | | | I wish we could typecheck llvm::format. llvm-svn: 185766
* Don't link with the archive library programs that don't use it.Rafael Espindola2013-06-173-3/+2
| | | | llvm-svn: 184081
* readobj: Dump PE/COFF optional records.Rui Ueyama2013-06-121-11/+77
| | | | | | | | | | | | These records are mandatory for executables and are used by the loader. Reviewers: rafael CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D939 llvm-svn: 183852
* Handle relocations that don't point to symbols.Rafael Espindola2013-06-053-12/+9
| | | | | | | | 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
* Introduce convenience typedefs for the 4 ELF object types.Rafael Espindola2013-05-091-26/+16
| | | | llvm-svn: 181509
* Change getRelocationAdditionalInfo to be ELF only.Rafael Espindola2013-05-091-4/+4
| | | | | | | It was only implemented for ELF where it collected the Addend, so this patch also renames it to getRelocationAddend. llvm-svn: 181502
* Revert r181009.Amara Emerson2013-05-033-70/+0
| | | | llvm-svn: 181079
* Add support for reading ARM ELF build attributes.Amara Emerson2013-05-033-0/+70
| | | | | | | | | | | Build attribute sections can now be read if they exist via ELFObjectFile, and the llvm-readobj tool has been extended with an option to dump this information if requested. Regression tests are also included which exercise these features. Also update the docs with a fixed ARM ABI link and a new link to the Addenda which provides the build attributes specification. llvm-svn: 181009
* Clarify getRelocationAddress x getRelocationOffset a bit.Rafael Espindola2013-04-252-3/+7
| | | | | | | | | | getRelocationAddress is for dynamic libraries and executables, getRelocationOffset for relocatable objects. Mark the getRelocationAddress of COFF and MachO as not implemented yet. Add a test of ELF's. llvm-readobj -r now prints the same values as readelf -r. llvm-svn: 180259
OpenPOWER on IntegriCloud