summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-readobj
Commit message (Collapse)AuthorAgeFilesLines
...
* Use makeArrayRef or None to avoid unnecessarily mentioning the ArrayRef type ↵Craig Topper2015-09-211-1/+1
| | | | | | extra times. NFC llvm-svn: 248140
* [llvm-readobj] Fix another "time of check to time of use bug".Davide Italiano2015-09-171-5/+0
| | | | | | It seems there's more copy-paste between tools than needed. llvm-svn: 247954
* [llvm-readobj] MachO -- dump LinkerOptions load command.Davide Italiano2015-09-093-0/+28
| | | | | | | | | | | | | | | | | | | | Example output: Linker Options { Size: 32 Count: 2 Strings [ Value: -framework Value: Cocoa ] } There were only two tests using this -- so I converted them as part of this commit rather than separately. Differential Revision: http://reviews.llvm.org/D12702 llvm-svn: 247106
* [llvm-readobj] MachO: dump the correct field.Davide Italiano2015-09-041-1/+1
| | | | | | | This was found while converting a test from macho-dump to llvm-readobj and will once I commit the converted test. llvm-svn: 246868
* [llvm-readobj] Dump MachO indirect symbols.Davide Italiano2015-09-033-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example output: File: <stdin> Format: Mach-O 32-bit i386 Arch: i386 AddressSize: 32bit Indirect Symbols { Number: 3 Symbols [ Entry { Entry Index: 0 Symbol Index: 0x4 } Entry { Entry Index: 1 Symbol Index: 0x0 } Entry { Entry Index: 2 Symbol Index: 0x1 } ] } Differential Revision: http://reviews.llvm.org/D12570 llvm-svn: 246789
* [llvm-readobj] MachO: Dump segment command.Davide Italiano2015-09-023-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | Example output: File: <stdin> Format: Mach-O arm Arch: arm AddressSize: 32bit Segment { Cmd: LC_SEGMENT Name: Size: 260 vmaddr: 0x0 vmsize: 0x10 fileoff: 408 filesize: 408 maxprot: rwx initprot: rwx nsects: 3 flags: 0x0 } Differential Revision: http://reviews.llvm.org/D12542 llvm-svn: 246665
* Pass a symbol table to getRelocationSymbol instead of returning one.Rafael Espindola2015-09-022-21/+24
| | | | | | | This removes a report_fatal_error from library and avoids checking a section property for every section entry. llvm-svn: 246656
* [llvm-readobj] MachO -- correctly dump section field 'Reserved3'Davide Italiano2015-09-011-0/+4
| | | | | | Before we incorrectly ignored it. llvm-svn: 246556
* [llvm-readobj] Dump MachO Dysymtab command.Davide Italiano2015-08-313-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-284-7/+57
| | | | | | 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-273-0/+45
| | | | | | | | | | | | | | | | | | 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/ELF] Factor out common code.Davide Italiano2015-08-231-12/+11
| | | | llvm-svn: 245813
* [llvm-readobj] Add support for MachO DataInCodeDataCommand.Davide Italiano2015-08-213-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Don't iterate over all sections in the ELFFile constructor.Rafael Espindola2015-08-102-13/+35
| | | | | | | With this we finally have an ELFFile that is O(1) to construct. This is helpful for programs like lld which have to do their own section walk. llvm-svn: 244510
* Delete getDotSymtabSec.Rafael Espindola2015-08-102-11/+19
| | | | | | Another step in avoiding iterating over all sections in the ELFFile constructor. llvm-svn: 244496
* Use continue to reduce indentation. NFC.Rafael Espindola2015-08-101-17/+19
| | | | llvm-svn: 244480
* Convert getSymbolSection to return an ErrorOr.Rafael Espindola2015-08-073-9/+8
| | | | | | | This function can actually fail since the symbol contains an index to the section and that can be invalid. llvm-svn: 244375
* Don't look for a SHT_DYNSYM in the ELFFile's constructor.Rafael Espindola2015-08-071-2/+9
| | | | | | Yet another step in not having it scan every section. llvm-svn: 244353
* Remove the symbol iteration functions that don't take a symbol table.Rafael Espindola2015-08-072-3/+3
| | | | | | Another step in making ELFFile's constructor not iterate over all sections. llvm-svn: 244351
* Add dynamic_table iterators back to ELF.h.Rafael Espindola2015-08-071-22/+15
| | | | | | | | | In tree they are only used by llvm-readobj, but it is also used by https://github.com/mono/CppSharp. While at it, add some missing error checking. llvm-svn: 244320
* ELF: Add AMDGPU specific defintionsTom Stellard2015-08-071-2/+24
| | | | | | | | | | Reviewers: rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11458 llvm-svn: 244303
* [llvm-readobj] Convert to range-loops.Davide Italiano2015-08-072-6/+4
| | | | llvm-svn: 244300
* Move to llvm-readobj code that is only used there.Rafael Espindola2015-08-062-22/+215
| | | | | | | | | | 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
* [Mips] Support DT_MIPS_RLD_MAP_REL dynamic section tag in the llvm-readobjSimon Atanasyan2015-08-011-0/+2
| | | | llvm-svn: 243833
* [COFF] Add IMAGE_SCN_TYPE_NOLOAD to SectionCharacteristicsDavid Majnemer2015-07-301-0/+1
| | | | llvm-svn: 243658
* [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
* Support printing relocations in files with no section table.Rafael Espindola2015-07-231-4/+9
| | | | llvm-svn: 242998
* Use typdef to simplify the code. NFC.Rafael Espindola2015-07-231-40/+41
| | | | llvm-svn: 242995
* Delete ELFEntityIterator. NFC.Rafael Espindola2015-07-221-31/+34
| | | | llvm-svn: 242901
* Don't iterate over the program headers in the constructor of ELFFile.Rafael Espindola2015-07-211-28/+162
| | | | | | | | | Not every program needs this information. In particular, it is necessary and sufficient for a static linker to scan the section table. llvm-svn: 242833
* Make printValue a member function.Rafael Espindola2015-07-211-6/+7
| | | | | | We were already passing 3 values it can get from ELFDumper. llvm-svn: 242829
* Remove always null argument.Rafael Espindola2015-07-211-2/+1
| | | | llvm-svn: 242828
* Replace the last uses of ELF::getSymbolName in llvm-readobj.Rafael Espindola2015-07-212-2/+8
| | | | llvm-svn: 242798
* Use helper function. NFC.Rafael Espindola2015-07-211-3/+1
| | | | llvm-svn: 242795
* llvm-readobj: use the associated string table to print symbols. NFI.Rafael Espindola2015-07-211-16/+44
| | | | | | | This just removes some cases that require ELFFile to eagerly parse the ELF file. llvm-svn: 242794
* Simplify printing the soname. NFC.Rafael Espindola2015-07-213-14/+7
| | | | llvm-svn: 242786
* Add missing c++ marker to .h file.Rafael Espindola2015-07-211-1/+1
| | | | llvm-svn: 242784
* Remove duplicated code.Rafael Espindola2015-07-201-4/+4
| | | | | | Both ELFObjectFile and ELFFile had an implementation of getLoadName. llvm-svn: 242725
* Simplify now that we can iterate backwards. NFC.Rafael Espindola2015-07-201-3/+16
| | | | llvm-svn: 242715
* Remove Elf_Rela_Iter and Elf_Rel_Iter.Rafael Espindola2015-07-202-34/+24
| | | | | | Use just the pointers and check for invalid relocation sections. llvm-svn: 242700
* Simplify iterating over program headers and detect corrupt ones.Rafael Espindola2015-07-201-13/+11
| | | | | | We now use a simple pointer and have range loops. llvm-svn: 242669
* llvm-readobj: Handle invalid references to the string table.Rafael Espindola2015-07-203-7/+16
| | | | llvm-svn: 242658
* llvm-readobj: call exit(1) on error.Rafael Espindola2015-07-206-91/+61
| | | | | | | | | 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-094-2/+22
| | | | | | This time without breaking the bots. llvm-svn: 241869
* [llvm-readobj] Print MIPS PLT tableSimon Atanasyan2015-07-091-73/+164
| | | | | | Now the -mips-plt-got prints both MIPS GOT and PLT tables. llvm-svn: 241836
* [llvm-readobj] Re-add sanity checking which was accidentally removed in r241764David Majnemer2015-07-091-2/+9
| | | | llvm-svn: 241831
* llvm-readobj: Fix an unused variable after r241764Justin Bogner2015-07-091-2/+3
| | | | llvm-svn: 241783
OpenPOWER on IntegriCloud