summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-readobj/llvm-readobj.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-readobj] Dump MachO Dysymtab command.Davide Italiano2015-08-311-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example output: File: <stdin> Format: Mach-O 64-bit x86-64 Arch: x86_64 AddressSize: 64bit Dysymtab { ilocalsym: 0 nlocalsym: 6 iextdefsym: 6 nextdefsym: 2 iundefsym: 8 nundefsym: 0 tocoff: 0 ntoc: 0 modtaboff: 0 nmodtab: 0 extrefsymoff: 0 nextrefsyms: 0 indirectsymoff: 0 nindirectsyms: 0 extreloff: 0 nextrel: 0 locreloff: 0 nlocrel: 0 } Differential Revision: http://reviews.llvm.org/D12496 llvm-svn: 246474
* [llvm-readobj] Add pair of missing braces.Davide Italiano2015-08-311-1/+2
| | | | | | This fixes a regression introduced in r246151. llvm-svn: 246453
* llvm-readobj: Dump more info for COFF import libraries.Rui Ueyama2015-08-281-6/+0
| | | | | | This patch teaches llvm-readobj to print out COFF import file header fields. llvm-svn: 246291
* Re-apply r246276 - Object: Teach llvm-ar to create symbol table for COFF ↵Rui Ueyama2015-08-281-0/+9
| | | | | | | | | | | short import files This patch includes a fix for a llvm-readobj test. With this patch, the tool does no longer print out COFF headers for the short import file, but that's probably desirable because the header for the short import file is dummy. llvm-svn: 246283
* [llvm-readobj] Add support for dumping MachO min version load command.Davide Italiano2015-08-271-0/+6
| | | | | | | | | | | | | | | | | | Example output: File: <stdin> Format: Mach-O arm Arch: arm AddressSize: 32bit MinVersion { Cmd: LC_VERSION_MIN_IPHONEOS Size: 16 Version: 99.8.7 SDK: n/a } Differential Revision: http://reviews.llvm.org/D12373 llvm-svn: 246151
* [llvm-readobj] Add support for MachO DataInCodeDataCommand.Davide Italiano2015-08-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example output: File: <stdin> Format: Mach-O arm Arch: arm AddressSize: 32bit DataInCode { Data offset: 300 Data size: 32 Data Regions [ DICE { Index: 0 Offset: 0 Length: 4 Kind: 1 } DICE { Index: 1 Offset: 4 Length: 4 Kind: 4 } DICE { Index: 2 Offset: 8 Length: 2 Kind: 3 } DICE { Index: 3 Offset: 10 Length: 1 Kind: 2 } ] } Differential Revision: http://reviews.llvm.org/D12084 llvm-svn: 245732
* [llvm-readobj] Convert to range-loops.Davide Italiano2015-08-071-4/+2
| | | | llvm-svn: 244300
* Move to llvm-readobj code that is only used there.Rafael Espindola2015-08-061-2/+2
| | | | | | | | | | lld might end up using a small part of this, but it will be in a much refactored form. For now this unblocks avoiding the full section scan in the ELFFile constructor. This also has a (very small) error handling improvement. llvm-svn: 244282
* [llvm-reaobj] Display COFF-specific sections/tables only if the object is COFF.Davide Italiano2015-07-241-9/+10
| | | | | | Just skip them otherwise. llvm-svn: 243086
* Simplify printing the soname. NFC.Rafael Espindola2015-07-211-14/+1
| | | | llvm-svn: 242786
* Remove duplicated code.Rafael Espindola2015-07-201-4/+4
| | | | | | Both ELFObjectFile and ELFFile had an implementation of getLoadName. llvm-svn: 242725
* llvm-readobj: Handle invalid references to the string table.Rafael Espindola2015-07-201-3/+3
| | | | llvm-svn: 242658
* llvm-readobj: call exit(1) on error.Rafael Espindola2015-07-201-7/+4
| | | | | | | | | llvm-readobj exists for testing llvm. We can safely stop the program the first time we know the input in corrupted. This is in preparation for making it handle a few more broken files. llvm-svn: 242656
* Refactor duplicated code. NFC.Rafael Espindola2015-07-201-8/+9
| | | | llvm-svn: 242655
* [Object][ELF] Support dumping hash-tables from files with no section table.Michael J. Spencer2015-07-091-0/+6
| | | | | | This time without breaking the bots. llvm-svn: 241869
* Temporarily reverting 241765, 241768, and 241772 to unbreak the build bots.Adrian Prantl2015-07-091-6/+0
| | | | llvm-svn: 241781
* [Object][ELF] Support dumping hash-tables from files with no section table.Michael J. Spencer2015-07-091-0/+6
| | | | llvm-svn: 241765
* Simplify. NFC.Rafael Espindola2015-07-061-3/+1
| | | | llvm-svn: 241458
* Don't return error_code from function that never fails.Rafael Espindola2015-06-291-3/+2
| | | | llvm-svn: 241021
* [StackMaps] Add a lightweight parser for stackmap version 1 sections.Lang Hames2015-06-261-0/+9
| | | | | | | | | | The parser provides a convenient interface for reading llvm stackmap v1 sections in object files. This patch also includes a new option for llvm-readobj, '-stackmap', which uses the parser to pretty-print stackmap sections for debugging/testing purposes. llvm-svn: 240860
* [Object][ELF] Add support for dumping dynamic relocations when sections are ↵Michael J. Spencer2015-06-251-3/+6
| | | | | | stripped. llvm-svn: 240703
* We don't need the targets to read objects.Rafael Espindola2015-06-251-3/+0
| | | | llvm-svn: 240684
* [llvm-readobj] Print MIPS .reginfo section contentSimon Atanasyan2015-06-161-0/+6
| | | | llvm-svn: 239856
* [llvm-readobj] Print .MIPS.abiflags section contentSimon Atanasyan2015-05-071-1/+8
| | | | | | | | | This change adds new flag -mips-abi-flags to the llvm-readobj. This flag forces printing of .MIPS.abiflags section content. https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking#10.2.1._.MIPS.abiflags llvm-svn: 236737
* llvm-readobj: teach it to handle MachO Universal Archive correctlyDavid Blaikie2015-04-131-7/+6
| | | | | | | | | | Patch by Chilledheart (rwindz0@gmail.com). Reviewed By: rafael Differential Revision: http://reviews.llvm.org/D8773 llvm-svn: 234758
* [llvm-readobj] add support for macho universal binary.Rafael Espindola2015-03-241-0/+17
| | | | | | Patch by Keyue Hu (Chilledheart)! llvm-svn: 233107
* Modify llvm-readobj to dump symbol record bytes.Zachary Turner2015-02-181-3/+8
| | | | | | | | | | This will help us study the format of individual symbol records more closely. Differential Revision: http://reviews.llvm.org/D7664 Reviewed by: Timur Iskhodzhanov llvm-svn: 229730
* llvm-readobj: add support to dump COFF export tablesSaleem Abdulrasool2015-01-031-0/+6
| | | | | | | This enhances llvm-readobj to print out the COFF export table, similar to the -coff-import option. This is useful for testing in lld. llvm-svn: 225120
* llvm-readobj: teach it how to dump COFF base relocation tableRui Ueyama2014-11-191-1/+8
| | | | llvm-svn: 222289
* llvm-readobj: relocAddressLess could potentially lieDavid Majnemer2014-11-131-2/+2
| | | | | | | | On error conditions, relocAddressLess might claim that a value is less than itself. Instead, abort llvm-readobj. No functionality change intended. llvm-svn: 221872
* llvm-readobj: add support to dump (COFF) directivesSaleem Abdulrasool2014-10-071-0/+7
| | | | | | | | PE/COFF has a special section (.drectve) which can be used to pass options to the linker (similar to LC_LINKER_OPTION). Add support to llvm-readobj to print the contents of the section for tests. llvm-svn: 219228
* This patch adds a new flag "-coff-imports" to llvm-readobj.Rui Ueyama2014-10-021-0/+6
| | | | | | | | | | | | | | When the flag is given, the command prints out the COFF import table. Currently only the import table directory will be printed. I'm going to make another patch to print out the imported symbols. The implementation of import directory entry iterator in COFFObjectFile.cpp was buggy. This patch fixes that too. http://reviews.llvm.org/D5569 llvm-svn: 218891
* Don't own the buffer in object::Binary.Rafael Espindola2014-08-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Owning the buffer is somewhat inflexible. Some Binaries have sub Binaries (like Archive) and we had to create dummy buffers just to handle that. It is also a bad fit for IRObjectFile where the Module wants to own the buffer too. Keeping this ownership would make supporting IR inside native objects particularly painful. This patch focuses in lib/Object. If something elsewhere used to own an Binary, now it also owns a MemoryBuffer. This patch introduces a few new types. * MemoryBufferRef. This is just a pair of StringRefs for the data and name. This is to MemoryBuffer as StringRef is to std::string. * OwningBinary. A combination of Binary and a MemoryBuffer. This is needed for convenience functions that take a filename and return both the buffer and the Binary using that buffer. The C api now uses OwningBinary to avoid any change in semantics. I will start a new thread to see if we want to change it and how. llvm-svn: 216002
* getLoadName is only implemented for ELF, make it ELF only.Rafael Espindola2014-08-081-1/+13
| | | | llvm-svn: 215219
* Remove some calls to std::move.Rafael Espindola2014-08-011-3/+3
| | | | | | | | | Instead of moving out the data in a ErrorOr<std::unique_ptr<Foo>>, get a reference to it. Thanks to David Blaikie for the suggestion. llvm-svn: 214516
* Use std::unique_ptr to make the ownership explicit.Rafael Espindola2014-07-311-2/+2
| | | | llvm-svn: 214377
* [llvm-readobj][ELF] New `-mips-plt-got` command line option to outputSimon Atanasyan2014-06-181-0/+20
| | | | | | | | MIPS GOT section. Patch reviewed by Rafael Espindola. llvm-svn: 211150
* Convert the Archive API to use ErrorOr.Rafael Espindola2014-06-161-3/+3
| | | | | | | | | Now that we have c++11, even things like ErrorOr<std::unique_ptr<...>> are easy to use. No intended functionality change. llvm-svn: 211033
* Remove 'using std::error_code' from tools.Rafael Espindola2014-06-131-9/+7
| | | | llvm-svn: 210876
* Remove all uses of 'using std::error_code' from headers.Rafael Espindola2014-06-131-0/+1
| | | | llvm-svn: 210866
* Remove system_error.h.Rafael Espindola2014-06-121-1/+1
| | | | | | | This is a minimal change to remove the header. I will remove the occurrences of "using std::error_code" in a followup patch. llvm-svn: 210803
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-061-6/+5
| | | | | | | | | | 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
* tools: add support for decoding ARM attributesSaleem Abdulrasool2014-01-301-0/+9
| | | | | | | | 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
* Rename these methods to match the style guide.Rafael Espindola2014-01-211-2/+2
| | | | llvm-svn: 199751
* 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
* Re-sort #include lines again, prior to moving headers around.Chandler Carruth2014-01-131-3/+0
| | | | llvm-svn: 199080
* Teach the llvm-readobj COFF dumper to dump debug line tables from object filesTimur Iskhodzhanov2013-12-191-0/+4
| | | | | | Reviewed at http://llvm-reviews.chandlerc.com/D2425 llvm-svn: 197674
* 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-081-2/+7
| | | | | | | | * 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
* Revert r181009.Amara Emerson2013-05-031-6/+0
| | | | llvm-svn: 181079
OpenPOWER on IntegriCloud