summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-readobj/Inputs
Commit message (Collapse)AuthorAgeFilesLines
* 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
* [llvm-readobj/ELF] fix: add correct test inputsIgor Kudrin2015-10-144-0/+0
| | | | llvm-svn: 250292
* [llvm-readobj/ELF] Print GNU Hash sectionIgor Kudrin2015-10-144-0/+0
| | | | | | | | Add a new command line switch, -gnu-hash-table, to print the content of that section. Differential Revision: http://reviews.llvm.org/D13696 llvm-svn: 250291
* ELF: Add AMDGPU specific defintionsTom Stellard2015-08-071-0/+0
| | | | | | | | | | Reviewers: rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11458 llvm-svn: 244303
* [Mips] Support DT_MIPS_RLD_MAP_REL dynamic section tag in the llvm-readobjSimon Atanasyan2015-08-011-0/+0
| | | | llvm-svn: 243833
* [llvm-readobj] Print MIPS PLT tableSimon Atanasyan2015-07-091-0/+0
| | | | | | Now the -mips-plt-got prints both MIPS GOT and PLT tables. llvm-svn: 241836
* [llvm-readobj] Print MIPS .reginfo section contentSimon Atanasyan2015-06-161-0/+0
| | | | llvm-svn: 239856
* [llvm-readobj/ELF] Teach how to decode DF_1_XXX flagsDavide Italiano2015-05-251-0/+0
| | | | | | | | | | | | | llvm-readobj -dynamic-table output. Before: 0x000000006FFFFFFB unknown After: 0x000000006FFFFFFB FLAGS_1 NOW ORIGIN Differential Revision: http://reviews.llvm.org/D9958 llvm-svn: 238151
* [llvm-readobj] Print .MIPS.abiflags section contentSimon Atanasyan2015-05-072-0/+0
| | | | | | | | | 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
* [Mips] Support DT_MIPS_OPTIONS dynamic section tag in the llvm-readobjSimon Atanasyan2015-04-201-0/+0
| | | | llvm-svn: 235285
* llvm-readobj: teach it to handle MachO Universal Archive correctlyDavid Blaikie2015-04-131-0/+0
| | | | | | | | | | 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/+0
| | | | | | Patch by Keyue Hu (Chilledheart)! llvm-svn: 233107
* [opaque pointer type] Add textual IR support for explicit type parameter to ↵David Blaikie2015-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gep operator Similar to gep (r230786) and load (r230794) changes. Similar migration script can be used to update test cases, which successfully migrated all of LLVM and Polly, but about 4 test cases needed manually changes in Clang. (this script will read the contents of stdin and massage it into stdout - wrap it in the 'apply.sh' script shown in previous commits + xargs to apply it over a large set of test cases) import fileinput import sys import re rep = re.compile(r"(getelementptr(?:\s+inbounds)?\s*\()((<\d*\s+x\s+)?([^@]*?)(|\s*addrspace\(\d+\))\s*\*(?(3)>)\s*)(?=$|%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|zeroinitializer|<|\[\[[a-zA-Z]|\{\{)", re.MULTILINE | re.DOTALL) def conv(match): line = match.group(1) line += match.group(4) line += ", " line += match.group(2) return line line = sys.stdin.read() off = 0 for match in re.finditer(rep, line): sys.stdout.write(line[off:match.start()]) sys.stdout.write(conv(match)) off = match.end() sys.stdout.write(line[off:]) llvm-svn: 232184
* llvm-readobj: add a test case for ARM_MOV32(T) base relocationSaleem Abdulrasool2015-01-311-0/+0
| | | | | | | | Add a trivial binary (int main() { return 0; }) built for Windows on ARM to ensure that we can correctly identify ARM_MOV32(T) base relocations. Addresses post-commit review comments. llvm-svn: 227673
* llvm-readobj: add support to dump COFF export tablesSaleem Abdulrasool2015-01-033-0/+0
| | | | | | | 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
* Update AArch64 ELF relocations to ABI 1.0Will Newton2014-11-262-2/+41
| | | | | | | | | | | | | | | | | | | | This mostly entails adding relocations, however there are a couple of changes to existing relocations: 1. R_AARCH64_NONE is defined to be zero rather than 256 R_AARCH64_NONE has been defined to be zero for a long time elsewhere e.g. binutils and glibc since the submission of the AArch64 port in 2012 so this is required for compatibility. 2. R_AARCH64_TLSDESC_ADR_PAGE renamed to R_AARCH64_TLSDESC_ADR_PAGE21 I don't think there is any way for relocation names to leak out of LLVM so this should not break anything. Tested with check-all with no regressions. llvm-svn: 222821
* Update ARM ELF relocations to ABI 2.09Will Newton2014-11-262-0/+1
| | | | | | Add R_ARM_IRELATIVE. llvm-svn: 222817
* Forgot to add a file for r222734David Majnemer2014-11-251-0/+0
| | | | llvm-svn: 222736
* Add a test for r221870David Majnemer2014-11-201-0/+0
| | | | | | | bad-relocs.obj.coff-i386 has a relocation whose symbol index is outside the symbol table. llvm-svn: 222413
* llvm-readobj: teach it how to dump COFF base relocation tableRui Ueyama2014-11-191-0/+0
| | | | llvm-svn: 222289
* Add VS2012-generated test inputs for ↵Timur Iskhodzhanov2014-10-135-0/+0
| | | | | | test/tools/llvm-readobj/codeview-linetables.test llvm-svn: 219621
* llvm-readobj: add test for r219228Rui Ueyama2014-10-081-0/+0
| | | | llvm-svn: 219274
* Fix dumping codeview line tables when there are multiple debug sectionsTimur Iskhodzhanov2014-10-061-0/+0
| | | | | | | | | | Codeview line tables for functions in different sections refer to a common STRING_TABLE_SUBSECTION for filenames. This happens when building with -Gy or with inline functions with MSVC. Original patch by Jeff Muizelaar! llvm-svn: 219125
* llvm-readobj: print COFF delay-load import tableRui Ueyama2014-10-032-0/+0
| | | | | | | | | This patch adds another iterator to access the delay-load import table and use it from llvm-readobj. http://reviews.llvm.org/D5594 llvm-svn: 218933
* llvm-readobj: add a test for COFF import-by-ordinal symbolsRui Ueyama2014-10-022-0/+0
| | | | llvm-svn: 218924
* This patch adds a new flag "-coff-imports" to llvm-readobj.Rui Ueyama2014-10-022-0/+0
| | | | | | | | | | | | | | 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
* Rebuild the inputs for the codeview-linetables.test with VS2013Timur Iskhodzhanov2014-09-238-0/+0
| | | | | | Also provide reproducible instructions llvm-svn: 218303
OpenPOWER on IntegriCloud