summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-readobj/Inputs
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-readobj] Print static MIPS GOTSimon Atanasyan2017-12-021-0/+0
| | | | | | | | | | If a linked binary file contains a dynamic section, the GOT layout defined by the dynamic section entries. In a statically linked file the GOT is just a series of entries. This change teaches `llvm-readobj` to print the GOT in that case. That provides a feature parity with GNU `readelf`. llvm-svn: 319616
* llvm-readobj: Add support for reading relocations in the Android packed format.Peter Collingbourne2017-10-252-0/+52
| | | | | | | | | | | This is in preparation for testing lld's upcoming relocation packing feature (D39152). I have verified that this implementation correctly unpacks the relocations from a Chromium DSO built with gold and the Android relocation packer for ARM32 and ARM64. Differential Revision: https://reviews.llvm.org/D39272 llvm-svn: 316543
* [codeview] Add support for inlinee listsReid Kleckner2017-10-231-0/+0
| | | | | | | | | | | This adds type index discovery and dumper support for symbol record kind 0x1168, which is a list of inlined function ids. This symbol kind is undocumented, but S_INLINEES is consistent with the existing nomenclature. Fixes PR34222 llvm-svn: 316398
* [Object] Initialize LoadConfig member to nullReid Kleckner2017-08-071-0/+0
| | | | | | | | | | Executables may not contain a load config, and clients should be able to test for nullability. Previously we'd return uninitialized memory. Now getLoadConfig32/64 return valid pointers or null. Fixes PR34108 llvm-svn: 310308
* [llvm-readobj] - Teach readobj to print DT_FILTER dynamic tag in human ↵George Rimar2017-07-142-2/+2
| | | | | | | | | | | readable form. Nothing special here, output format is similar to the format used by binutils readelf and ELF Tool Chain readelf. Differential revision: https://reviews.llvm.org/D35351 llvm-svn: 308033
* [WebAssembly] Be consistent in generating trivial test input filesSam Clegg2017-07-102-6/+8
| | | | | | | | | | | | | For each checked-in wasm file, make sure the there is corresponding .ll file that can be used to regenerate it if needed. Add test/Object/Inputs/trivial-object-test.wasm to match other formats and add some new wasm tests in test/Object. Differential Revision: https://reviews.llvm.org/D35213 llvm-svn: 307585
* [llvm-readobj] Improve printouts for COFF ARM64 binariesMartin Storsjo2017-06-301-0/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D34835 llvm-svn: 306795
* [llvm-readobj] Fix COFF RVA table dumping bugReid Kleckner2017-06-231-0/+0
| | | | | | | | We would return an error in getVaPtr if the RVA table being dumped was the last data in the .rdata section. Avoid the issue by subtracting one from the offset and adding it back to get an open interval again. llvm-svn: 306171
* [llvm-readobj] Dump the COFF image load configReid Kleckner2017-06-222-0/+0
| | | | | | | | This includes the safe SEH tables and the control flow guard function table. LLD will emit the guard table soon, and I need a tool that dumps them for testing. llvm-svn: 305979
* AMDGPU: Remove deprecated and unused elf definitionsKonstantin Zhuravlyov2017-06-052-0/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D33689 llvm-svn: 304737
* Quick fix to D32609, it seems .o files are not transferred in all cases.Eric Beckmann2017-05-081-0/+0
| | | | | | Therefore the .o file in question is renamed to .obj.coff. llvm-svn: 302400
* Update llvm-readobj -coff-resources to display tree structure.Eric Beckmann2017-05-084-0/+44
| | | | | | | | | | | | Summary: Continue making updates to llvm-readobj to display resource sections. This is necessary for testing the up and coming cvtres tool. Reviewers: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32609 llvm-svn: 302399
* Revert "Hopefully one last commit to fix this patch, addresses string reference"Eric Beckmann2017-05-085-44/+0
| | | | | | | | | | | | | | | | | | | | | Summary: This reverts commit 56beec1b1cfc6d263e5eddb7efff06117c0724d2. Revert "Quick fix to D32609, it seems .o files are not transferred in all cases." This reverts commit 7652eecd29cfdeeab7f76f687586607a99ff4e36. Revert "Update llvm-readobj -coff-resources to display tree structure." This reverts commit 422b62c4d302cfc92401418c2acd165056081ed7. Reviewers: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32958 llvm-svn: 302397
* Quick fix to D32609, it seems .o files are not transferred in all cases.Eric Beckmann2017-05-071-0/+0
| | | | | | Therefore the .o file in question is renamed to .obj.coff. llvm-svn: 302388
* Update llvm-readobj -coff-resources to display tree structure.Eric Beckmann2017-05-074-0/+44
| | | | | | | | | | | | Summary: Continue making updates to llvm-readobj to display resource sections. This is necessary for testing the up and coming cvtres tool. Reviewers: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32609 llvm-svn: 302386
* COFF Import: expose both symbolsSaleem Abdulrasool2017-04-281-0/+0
| | | | | | | | | COFF Import libraries which use the obsolete CONSTANT export are supposed to get two symbols, one with the `_imp_` prefix and one without. Ensure that we expose both for iteration. This is necessary to fix the librarian with COFF CONSTANT exports. llvm-svn: 301614
* [WebAssembly] Improve readobj and nm support for wasmSam Clegg2017-04-141-0/+0
| | | | | | | | | Now that the libObect support for wasm is better we can have readobj and nm produce more useful output too. Differential Revision: https://reviews.llvm.org/D31514 llvm-svn: 300365
* [codeview] Cope with unsorted streams in type mergingReid Kleckner2017-04-032-0/+0
| | | | | | | | | | | | | | | Summary: MASM can produce type streams that are not topologically sorted. It can even produce type streams with circular references, but those are not common in practice. Reviewers: inglorion, ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31629 llvm-svn: 299403
* [codeview] Add support for label type recordsReid Kleckner2017-04-031-0/+0
| | | | | | MASM can produce these type records. llvm-svn: 299388
* [WebAssembly] Improve support for WebAssembly binary formatDerek Schuff2017-03-301-0/+0
| | | | | | | | | | | | | | | | | | | Mostly this change adds support converting to and from YAML which will allow us to write more test cases for the WebAssembly MC and lld ports. Better support for objdump, readelf, and nm will be in followup CLs. I had to update the two wasm test binaries because they used the old style 'name' section which is no longer supported. Differential Revision: https://reviews.llvm.org/D31099 Patch by Sam Clegg llvm-svn: 299101
* [codeview] Fix buggy BeginIndexMapSize assertionReid Kleckner2017-03-291-0/+0
| | | | | | | | | | | This assert is just trying to test that processing each record adds exactly one entry to the index map. The assert logic was wrong when the first record in the type stream was a field list. I've simplified the code by moving the LF_FIELDLIST-specific logic into the callback for that record type. llvm-svn: 299035
* [WebAssembly] Update llvm-readobj tests for switch to version 0x1Derek Schuff2017-02-221-0/+0
| | | | llvm-svn: 295875
* [WebAssembly] Add wasm support for llvm-readobjDerek Schuff2017-01-301-0/+0
| | | | | | | | | | | Create a WasmDumper subclass of ObjDumper to support Webassembly binary files. Patch by Sam Clegg Differential Revision: https://reviews.llvm.org/D27355 llvm-svn: 293569
* AArch64 ILP32 relocations for assembly and ELFJoel Jones2016-10-242-0/+91
| | | | | | | | | | | | | | | | | | | Summary: Add relocations for AArch64 ILP32. Includes: - Addition of definitions for R_AARCH32_* - Definition of new -target-abi: ilp32 - Definition of data layout string - Tests for added relocations. Not comprehensive, but matches existing tests for 64-bit. Renames "CHECK-OBJ" to "CHECK-OBJ-LP64". - Tests for llvm-readobj Reviewers: zatrazz, peter.smith, echristo, t.p.northover Subscribers: aemerson, rengolin, mehdi_amini Differential Revision: https://reviews.llvm.org/D25159 llvm-svn: 284973
* COFF: Fix short import lib import name type bitshiftMartell Malone2016-10-011-0/+0
| | | | | | | | | | | | | | As per the PE COFF spec (section 8.3, Import Name Type) Offset: 18 Size 2 bits Name: Type Offset: 20 Size 3 bits Name: Name Type Offset: 20 added based on 18+2 Partially commited as rL279069 Differential Revision: https://reviews.llvm.org/D23540 llvm-svn: 283055
* [llvm-readobj] - Teach readobj to print DT_AUXILIARY dynamic tag in human ↵George Rimar2016-09-022-0/+2
| | | | | | | | | | readable form. Previously DT_AUXILIARY was unknown, patch fixes that. Differential revision: https://reviews.llvm.org/D24138 llvm-svn: 280471
* llvm-readobj: handle import libraries with -coff-exportsSaleem Abdulrasool2016-08-181-0/+0
| | | | | | | | `link -dump -exports` lists exported symbols from import libraries as well as normal dlls. Ensure that we can handle import libraries as well in llvm-readobj. llvm-svn: 279069
* [lanai] Update ELF number to correspond to the assigned number.Jacques Pienaar2016-06-282-0/+0
| | | | | | Change EM_LANAI to correspond to machine number assigned by Xinuos. llvm-svn: 274042
* [yaml2obj] Remove --format option in favor of YAML tagsChris Bieneman2016-06-272-0/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: Our YAML library's handling of tags isn't perfect, but it is good enough to get rid of the need for the --format argument to yaml2obj. This patch does exactly that. Instead of requiring --format, it infers the format based on the tags found in the object file. The supported tags are: !ELF !COFF !mach-o !fat-mach-o I have a corresponding patch that is quite large that fixes up all the in-tree test cases. Reviewers: rafael, Bigcheese, compnerd, silvas Subscribers: compnerd, llvm-commits Differential Revision: http://reviews.llvm.org/D21711 llvm-svn: 273915
* [llvm-readobj] - Teach llvm-readobj to dump .gnu.version_r sectionsGeorge Rimar2016-06-071-0/+0
| | | | | | | | | | SHT_GNU_verneed (.gnu.version_r) is a version dependency section. It was the last symbol versioning relative section that was not dumped, now it is. Differential revision: http://reviews.llvm.org/D21024 llvm-svn: 271998
* [COFF] Expose the PE debug data directory and dump itReid Kleckner2016-06-021-0/+0
| | | | | | | | | | | | This directory is used to find if there is a PDB associated with an executable. I plan to use this functionality to teach llvm-symbolizer whether it should use DIA or DWARF to symbolize a given DLL. Reviewers: majnemer Differential Revision: http://reviews.llvm.org/D20885 llvm-svn: 271539
* [llvm-readobj] - Teach readobj to recognize SHF_COMPRESSED flag.George Rimar2016-05-211-0/+0
| | | | | | | | | | | | | | | | | | | | | | | Main problem here was that SHF_COMPRESSED has the same value with XCORE_SHF_CP_SECTION, which was included as standart (common) flag. As far I understand xCore is a family of controllers and it that means it's constant should be processed separately, only if e_machine == EM_XCORE, otherwise llvm-readobj would output different constants twice for compressed section: Flags [ .. SHF_COMPRESSED (0x800) .. XCORE_SHF_CP_SECTION (0x800) .. ] what probably does not make sence if you're not working with xcore file. Differential revision: http://reviews.llvm.org/D20273 llvm-svn: 270320
* [codeview] Test serialization of all known type recordsReid Kleckner2016-05-171-0/+0
| | | | | | | | | | | This just checks that we emit all type records once, and then after merging the type stream with no other type streams, we still emit every kind of type record. We could test the dumper output more closely, but that would make the test very brittle. Currently we're just getting coverage. llvm-svn: 269778
* [codeview] Add type stream merging prototypeReid Kleckner2016-05-142-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This code is intended to be used as part of LLD's PDB writing. Until that exists, this is exposed via llvm-readobj for testing purposes. Type stream merging uses the following algorithm: - Begin with a new empty stream, and a new empty hash table that maps from type record contents to new type index. - For each new type stream, maintain a map from source type index to destination type index. - For each record, copy it and rewrite its type indices to be valid in the destination type stream. - If the new type record is not already present in the destination stream hash table, append it to the destination type stream, assign it the next type index, and update the two hash tables. - If the type record already exists in the destination stream, discard it and update the type index map to forward the source type index to the existing destination type index. Reviewers: zturner, ruiu Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D20122 llvm-svn: 269521
* [codeview] Fix dumping VFTables, stop when we see LF_PAD*Reid Kleckner2016-05-121-0/+0
| | | | | | Also stop visiting type records when we encounter an error. llvm-svn: 269374
* [llvm-readobj] Print MIPS .MIPS.options section contentSimon Atanasyan2016-05-041-0/+0
| | | | | | | | | .MIPS.options section specifies miscellaneous options to be applied to an object file. LLVM as well as modern versions of GNU tools emit the only type of the options - ODK_REGINFO. The patch teaches llvm-readobj to print details of the ODK_REGINFO and skip contents of other options. llvm-svn: 268478
* [llvm-readobj] Impl GNU style program headers printHemant Kulkarni2016-03-252-0/+0
| | | | | | | | readelf -lW Differential Revision: http://reviews.llvm.org/D18372 llvm-svn: 264415
* [llvm-readobj] Decode st_other symbol's flagsSimon Atanasyan2016-03-242-0/+0
| | | | | | | | | The patch supports common STV_xxx visibility flags and MIPS specific STO_MIPS_xxx flags. Differential Revision: http://reviews.llvm.org/D18447 llvm-svn: 264300
* [llvm-readobj] Impl GNU style symbols printingHemant Kulkarni2016-03-211-0/+0
| | | | | | | | Implements "readelf -sW and readelf -DsW" Differential Revision: http://reviews.llvm.org/D18224 llvm-svn: 263952
* [lanai] Add ELF enum value and relocations.Jacques Pienaar2016-03-013-0/+9
| | | | | | | | | | Add ELF enum value and relocations for Lanai backed. General Lanai backend discussion on llvm-dev thread "[RFC] Lanai backend" (http://lists.llvm.org/pipermail/llvm-dev/2016-February/095118.html). Differential Revision: http://reviews.llvm.org/D17008 llvm-svn: 262394
* This reverts commit r260488 and r260489.Rafael Espindola2016-02-162-0/+0
| | | | | | | | | | | Original messages: Revert "[readobj] Handle ELF files with no section table or with no program headers." Revert "[readobj] Dump DT_JMPREL relocations when outputting dynamic relocations." r260489 depends on r260488 and among other issues r260488 deleted error handling code. llvm-svn: 260962
* [readobj] Handle ELF files with no section table or with no program headers.Michael J. Spencer2016-02-112-0/+0
| | | | | | | | This adds support for finding the dynamic table and dynamic symbol table via the section table or the program header table. If there's no section table an attempt is made to figure out the length of the dynamic symbol table. llvm-svn: 260488
* [llvm-readobj][ELF] Show MIPS GOT content when there is another zero-sized ↵Simon Atanasyan2016-02-091-0/+0
| | | | | | | | | | | | | section at the same address It is possible to have .got section and one or more zero-sized section at the same address. This patch first checks that GOT (or GOT PLT) section should have non-zero size using corresponding dynamic tags. Then it looks up not empty section at the specified address. Differential Revision: http://reviews.llvm.org/D16968 llvm-svn: 260245
* [llvm-readobj] Add -elf-section-groups optionHemant Kulkarni2016-01-261-0/+0
| | | | | | | | | Adds a way to inspect SHT_GROUP sections in ELF objects. Displays signature, member sections of these sections. Differential revision: http://reviews.llvm.org/D16555 llvm-svn: 258845
* Fixed CRLF->LF line endings from r257914. NFC.George Rimar2016-01-161-13/+13
| | | | llvm-svn: 257990
* Recommit r257912George Rimar2016-01-152-8/+13
| | | | | | | | | | | | | | Added forgotten ELFDumper.cpp to commit. Initial commit message: [llvm-readobj] Add support for TLSDESC_PLT and TLSDESC_GOT dynamic section tags to the llvm-readobj. If module uses uses lazy TLSDESC relocations it should define DT_TLSDESC_PLT and DT_TLSDESC_GOT entries. They were unknown for llvm-readobj before this patch. Differential revision: http://reviews.llvm.org/D16224 llvm-svn: 257914
* Revert r257912 - forgot to commit one file.George Rimar2016-01-152-13/+8
| | | | | | | | | | | | | | | | Initial commit message: [llvm-readobj] Add support for TLSDESC_PLT and TLSDESC_GOT dynamic section tags to the llvm-readobj. If module uses uses lazy TLSDESC relocations it should define DT_TLSDESC_PLT and DT_TLSDESC_GOT entries. They were unknown for llvm-readobj before this patch. Differential revision: http://reviews.llvm.org/D16224 ---- Added : /llvm/trunk/test/tools/llvm-readobj/Inputs/dynamic-table-so.aarch64 Modified : /llvm/trunk/test/tools/llvm-readobj/Inputs/dynamic-table.c Modified : /llvm/trunk/test/tools/llvm-readobj/dynamic.test llvm-svn: 257913
* [llvm-readobj] Add support for TLSDESC_PLT and TLSDESC_GOT dynamic section ↵George Rimar2016-01-152-8/+13
| | | | | | | | | | | tags to the llvm-readobj. If module uses uses lazy TLSDESC relocations it should define DT_TLSDESC_PLT and DT_TLSDESC_GOT entries. They were unknown for llvm-readobj before this patch. Differential revision: http://reviews.llvm.org/D16224 llvm-svn: 257912
* [codeview] Dump CodeView inlinee lines subsectionReid Kleckner2016-01-141-0/+0
| | | | llvm-svn: 257790
* [llvm-readobj/ELF] Dump DT_VERDEF/DT_VERDEFNUM correctly.Davide Italiano2015-10-151-0/+0
| | | | llvm-svn: 250464
OpenPOWER on IntegriCloud