summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-readobj
Commit message (Collapse)AuthorAgeFilesLines
...
* Object: Add support for bigobjDavid Majnemer2014-09-106-9/+144
| | | | | | | | | | | | | | | | | | | | | | This adds support for reading the "bigobj" variant of COFF produced by cl's /bigobj and mingw's -mbig-obj. The most significant difference that bigobj brings is more than 2**16 sections to COFF. bigobj brings a few interesting differences with it: - It doesn't have a Characteristics field in the file header. - It doesn't have a SizeOfOptionalHeader field in the file header (it's only used in executable files). - Auxiliary symbol records have the same width as a symbol table entry. Since symbol table entries are bigger, so are auxiliary symbol records. Write support will come soon. Differential Revision: http://reviews.llvm.org/D5259 llvm-svn: 217496
* AArch64: add support for dynamic-loader relocationsTim Northover2014-08-113-0/+22
| | | | | | | | | LLD needs them, and it's good to be able to print them properly when our object dumpers encounter them. Patch by Daniel Stewart. llvm-svn: 215352
* llvm-readobj: zero out timestamp in COFF auto-generated test files.Tim Northover2014-08-113-0/+4
| | | | | | | | The timestamp meant these files changed with each invocation of relocs.py, confusing matters when we add relocations and need to update the tests. llvm-svn: 215350
* [Mips] Support SHT_MIPS_ABIFLAGS section type flag in the llvm-readobj,Simon Atanasyan2014-07-132-0/+33
| | | | | | obj2yaml and yaml2obj tools. llvm-svn: 212908
* [llvm-readobj] Fix output of MIPS GOT without local and global entries.Simon Atanasyan2014-07-052-0/+25
| | | | llvm-svn: 212374
* llvm-readobj: fix MachO relocatoin printing a bit.Tim Northover2014-07-042-52/+52
| | | | | | | | | | | | | | | | There were two issues here: 1. At the very least, scattered relocations cannot use the same code to determine the corresponding symbol being referred to. For some reason we pretend there is no symbol, even when one actually exists in the symtab, so to match this behaviour getRelocationSymbol should simply return symbols_end for scattered relocations. 2. Printing "-" when we can't get a symbol (including the scattered case, but not exclusively), isn't that helpful. In both cases there *is* interesting information in that field, so we should print it. As hex will do. Small part of rdar://problem/17553104 llvm-svn: 212332
* [ELF][Mips] Fix recognition of MIPS 64-bit arch in the ↵Simon Atanasyan2014-06-271-1/+27
| | | | | | ELFObjectFile:getArch() method. llvm-svn: 211891
* [llvm-readobj][ELF] New `-mips-plt-got` command line option to outputSimon Atanasyan2014-06-182-0/+306
| | | | | | | | MIPS GOT section. Patch reviewed by Rafael Espindola. llvm-svn: 211150
* Reduce verbiage of lit.local.cfg filesAlp Toker2014-06-091-2/+1
| | | | | | We can just split targets_to_build in one place and make it immutable. llvm-svn: 210496
* [llvm-readobj] Print values of FLAGS and MIPS_FLAGS dynamic table tagsSimon Atanasyan2014-05-112-2/+43
| | | | | | in a human readable form. llvm-svn: 208489
* tools: fix invalid printing, buffer overrun in llvm-readobjSaleem Abdulrasool2014-04-162-0/+39
| | | | | | All auxiliary records are consumed when accessing a File record. llvm-svn: 206354
* tools: address possible non-null terminated filenamesSaleem Abdulrasool2014-04-142-0/+41
| | | | | | | | | If a filename is a multiple of 18 characters, there will be no null-terminator. This will result in an invalid access by the constructed StringRef. Add a test case to exercise this and fix that handling. Address this same vulnerability in llvm-readobj as well. llvm-svn: 206145
* Teach llvm-readobj to print human friendly description of reserved sections.Rafael Espindola2014-03-241-2/+2
| | | | llvm-svn: 204584
* Object/COFF: Add function to check if section number is reserved one.Rui Ueyama2014-03-183-1/+19
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D3103 llvm-svn: 204199
* llvm-readobj: Print referred symbol name for CLR token definitionNico Rieck2014-03-171-1/+1
| | | | llvm-svn: 204024
* llvm-readobj: Add test for COFF auxiliary symbols as used by C++/CLINico Rieck2014-03-173-0/+44
| | | | llvm-svn: 204023
* Support: add support to identify WinCOFF/ARM objectsSaleem Abdulrasool2014-03-132-0/+17
| | | | | | | Add the Windows COFF ARM object file magic. This enables the LLVM tools to interact with COFF object files for Windows on ARM. llvm-svn: 203761
* Fix the printing of n_type.Rafael Espindola2014-03-061-9/+18
| | | | | | | Despite the name, n_type contains the type of the symbol, but also if it is extern or private extern. llvm-svn: 203154
* Relax COFF string table checkNico Rieck2014-02-262-0/+8
| | | | | | | | | COFF object files with 0 as string table size are currently rejected. This prevents us from reading object files written by tools like cvtres that violate the PECOFF spec and write 0 instead of 4 for the size of an empty string table. llvm-svn: 202292
* tools: add support for decoding ARM attributesSaleem Abdulrasool2014-01-301-0/+287
| | | | | | | | 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 IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA.Rui Ueyama2014-01-271-1/+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/+1
| | | | | | | | | 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-262-0/+82
| | | | | | | | | | | | 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
* tools: support decoding ARM EHABI opcodes in readobjSaleem Abdulrasool2014-01-211-23/+146
| | | | | | | | | | | | | | 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
* llvm-readobj: address review comments for ARM EHABI printingSaleem Abdulrasool2014-01-091-27/+27
| | | | | | | | 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
* tests: disable ARM unwinding tests if ARM is unavailableSaleem Abdulrasool2014-01-082-0/+4
| | | | | | | | | | Appease the buildbots for targets which do not build the ARM support by moving the ARM specific test into a subdirectory and use the lit configuration to disable them appropriately. Thanks to chapuni and thakis for explaining how to do this! llvm-svn: 198736
* llvm-readobj: add support for ARM EHABI unwind infoSaleem Abdulrasool2014-01-081-0/+203
| | | | | | | | | | | | | | | 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-053-1/+41
| | | | | | section tags to the llvm-readobj. llvm-svn: 198561
* [Mips] Rename the test case input file. No functional changes.Simon Atanasyan2014-01-053-2/+3
| | | | llvm-svn: 198560
* Teach the llvm-readobj COFF dumper to dump debug line tables from object filesTimur Iskhodzhanov2013-12-195-0/+282
| | | | | | Reviewed at http://llvm-reviews.chandlerc.com/D2425 llvm-svn: 197674
* Remove the COFF files with Z7 debug info from the repoTimur Iskhodzhanov2013-12-194-0/+0
| | | | | | | Rationale: going to land D2425 shortly. I'll re-land these COFF files along with D2425 to simplify the SVN history llvm-svn: 197673
* Add some simple COFF files with Z7 debug infoTimur Iskhodzhanov2013-12-174-0/+0
| | | | | | These will later be used as tests for the dumper part of http://llvm-reviews.chandlerc.com/D2232 llvm-svn: 197499
* Path: Recognize COFF import library file magic.Rui Ueyama2013-11-152-0/+17
| | | | | | | | | | | | Summary: Make identify_magic to recognize COFF import file. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2165 llvm-svn: 194852
* Recognize 0x0000 as a COFF file magic.Rui Ueyama2013-11-142-0/+16
| | | | | | | | | | | | | | | Summary: Some machine-type-neutral object files containing only undefined symbols actually do exist in the Windows standard library. Need to recognize them as COFF files. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2164 llvm-svn: 194734
* Add support for DT_VERxxx and DT_MIPS_xxx .dynamic section entries to theSimon Atanasyan2013-11-113-0/+40
| | | | | | | | | 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-0/+30
| | | | | | | The patch reviewed by Michael Spencer. http://llvm-reviews.chandlerc.com/D1846 llvm-svn: 192093
* Print string value for DT_RPATH and DT_RUNPATH.Joerg Sonnenberger2013-09-032-0/+4
| | | | llvm-svn: 189829
* [tests] Cleanup initialization of test suffixes.Daniel Dunbar2013-08-161-1/+0
| | | | | | | | | | | | | | | | | - Instead of setting the suffixes in a bunch of places, just set one master list in the top-level config. We now only modify the suffix list in a few suites that have one particular unique suffix (.ml, .mc, .yaml, .td, .py). - Aside from removing the need for a bunch of lit.local.cfg files, this enables 4 tests that were inadvertently being skipped (one in Transforms/BranchFolding, a .s file each in DebugInfo/AArch64 and CodeGen/PowerPC, and one in CodeGen/SI which is now failing and has been XFAILED). - This commit also fixes a bunch of config files to use config.root instead of older copy-pasted code. llvm-svn: 188513
* Remove the mblaze backend from llvm.Rafael Espindola2013-07-252-48/+0
| | | | | | 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-192-11/+45
| | | | | | | | 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-182-45/+11
| | | | | | Because it broke s390x and ppc64-linux buildbots. This reverts commit r186623. llvm-svn: 186627
* COFFDumper: Dump data directory entries.Rui Ueyama2013-07-182-11/+45
| | | | | | | | | | | | | | | | | 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
* readobj: Dump PE/COFF optional records.Rui Ueyama2013-06-122-0/+51
| | | | | | | | | | | | 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
* Don't hide the first ELF symbol.Rafael Espindola2013-06-051-0/+9
| | | | | | | | The first symbol on ELF is dummy, but it has a defined content and readelf normally displays it. With this change llvm-readobj also displays it and we can check that llvm-mc output is correct according to the standard. llvm-svn: 183337
* Change how we iterate over relocations on ELF.Rafael Espindola2013-05-302-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | For COFF and MachO, sections semantically have relocations that apply to them. That is not the case on ELF. In relocatable objects (.o), a section with relocations in ELF has offsets to another section where the relocations should be applied. In dynamic objects and executables, relocations don't have an offset, they have a virtual address. The section sh_info may or may not point to another section, but that is not actually used for resolving the relocations. This patch exposes that in the ObjectFile API. It has the following advantages: * Most (all?) clients can handle this more efficiently. They will normally walk all relocations, so doing an effort to iterate in a particular order doesn't save time. * llvm-readobj now prints relocations in the same way the native readelf does. * probably most important, relocations that don't point to any section are now visible. This is the case of relocations in the rela.dyn section. See the updated relocation-executable.test for example. llvm-svn: 182908
* Use pointers to iterate over symbols.Rafael Espindola2013-04-242-52/+52
| | | | | | | | While here, don't report a dummy symbol for relocations that don't have symbols. We used to says such relocations were for the first defined symbol, but now we return end_symbols(). The llvm-readobj output change agrees with otool. llvm-svn: 180214
* At Jim Grosbach's request detemplate Object/MachO.h.Rafael Espindola2013-04-184-0/+487
| | | | | | | We are still able to handle mixed endian objects by swapping one struct at a time. llvm-svn: 179778
* Finish templating MachObjectFile over endianness.Rafael Espindola2013-04-135-0/+533
| | | | | | | We are now able to handle big endian macho files in llvm-readobject. Thanks to David Fang for providing the object files. llvm-svn: 179440
* Teach llvm-readobj to print ELF program headersNico Rieck2013-04-121-0/+74
| | | | llvm-svn: 179363
* Add extensive relocation tests for llvm-readobjNico Rieck2013-04-1214-0/+1749
| | | | | | | This test ensures that relocation type names returned by libObject match the raw relocation type value. llvm-svn: 179360
OpenPOWER on IntegriCloud