summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-readobj
Commit message (Collapse)AuthorAgeFilesLines
...
* llvm-readobj: Dump more info for COFF import libraries.Rui Ueyama2015-08-281-1/+5
| | | | | | 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-13/+1
| | | | | | | | | | | 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
* ELF: Add AMDGPU specific defintionsTom Stellard2015-08-072-0/+28
| | | | | | | | | | 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-012-0/+24
| | | | llvm-svn: 243833
* [llvm-readobj] Print MIPS PLT tableSimon Atanasyan2015-07-092-0/+34
| | | | | | Now the -mips-plt-got prints both MIPS GOT and PLT tables. llvm-svn: 241836
* [CodeView] Add support for emitting column informationDavid Majnemer2015-07-091-0/+10
| | | | | | | | | | Column information is present in CodeView when the line table subsection has bit 0 set to 1 in it's flags field. The column information is represented as a pair of 16-bit quantities: a starting and ending column. This information is present at the end of the chunk, after all the line-PC pairs. llvm-svn: 241764
* Improve the --expand-relocs handling of MachO.Rafael Espindola2015-06-182-168/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In a relocation target can take 3 basic forms * A r_value in scattered relocations. * A symbol in external relocations. * A section is non-external relocations. Have the dump reflect that. With this change we go from CHECK-NEXT: Extern: 0 CHECK-NEXT: Type: X86_64_RELOC_SUBTRACTOR (5) CHECK-NEXT: Symbol: 0x2 CHECK-NEXT: Scattered: 0 To just // CHECK-NEXT: Type: X86_64_RELOC_SUBTRACTOR (5) // CHECK-NEXT: Section: __data (2) Since the relocation is with a section, we print the seciton name and don't need to say that it is not scattered or external. Someone motivated can add further special cases for things like ARM64_RELOC_ADDEND and ARM_RELOC_PAIR. llvm-svn: 240073
* Pass --expand-relocs to a few more tests.Rafael Espindola2015-06-182-44/+364
| | | | llvm-svn: 240069
* [llvm-readobj] Print MIPS .reginfo section contentSimon Atanasyan2015-06-162-0/+10
| | | | llvm-svn: 239856
* Fix the interpretation of a 0 st_name.Rafael Espindola2015-06-031-1/+1
| | | | | | | | | | | | | | The ELF spec is very clear: ----------------------------------------------------------------------------- If the value is non-zero, it represents a string table index that gives the symbol name. Otherwise, the symbol table entry has no name. -------------------------------------------------------------------------- In particular, a st_name of 0 most certainly doesn't mean that the symbol has the same name as the section. llvm-svn: 238899
* Clarify how the binary file checked in was generated.Davide Italiano2015-05-301-0/+4
| | | | llvm-svn: 238665
* [llvm-readobj/ELF] Teach how to decode DF_1_XXX flagsDavide Italiano2015-05-252-0/+6
| | | | | | | | | | | | | 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] Teach llvm-readobj to print PT_MIPS_ABIFLAGS program headerSimon Atanasyan2015-05-151-5/+17
| | | | llvm-svn: 237451
* [llvm-readobj] Print .MIPS.abiflags section contentSimon Atanasyan2015-05-073-0/+42
| | | | | | | | | 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-202-0/+22
| | | | llvm-svn: 235285
* llvm-readobj: teach it to handle MachO Universal Archive correctlyDavid Blaikie2015-04-132-0/+156
| | | | | | | | | | 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-242-0/+141
| | | | | | 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
* Modify llvm-readobj to dump symbol record bytes.Zachary Turner2015-02-181-14/+14
| | | | | | | | | | 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 a test case for ARM_MOV32(T) base relocationSaleem Abdulrasool2015-01-312-0/+7
| | | | | | | | 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
* Emit the build attribute Tag_conformance.Charlie Turner2015-01-052-0/+16
| | | | | | | | | | | Claim conformance to version 2.09 of the ARM ABI. This build attribute must be emitted first amongst the build attributes when written to an object file. This is to simplify conformance detection by consumers. Change-Id: If9eddcfc416bc9ad6e5cc8cdcb05d0031af7657e llvm-svn: 225166
* llvm-readobj: add support to dump COFF export tablesSaleem Abdulrasool2015-01-034-0/+11
| | | | | | | 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
* Test all <build attribute, value> pairs.Charlie Turner2014-11-2822-287/+1148
| | | | | | | | | | Add more tests to make sure the encoding/decoding of build attributes works correctly for all permissible values of build attributes. For cases where there are an infinite number of such values, a representative subset has been settled for. Change-Id: I2643c9624c211b2d56405306e16eec2d487bc5d6 llvm-svn: 222917
* Stop uppercasing build attribute data.Charlie Turner2014-11-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | The string data for string-valued build attributes were being unconditionally uppercased. There is no mention in the ARM ABI addenda about case conventions, so it's technically implementation defined as to whether the data are capitialised in some way or not. However, there are good reasons not to captialise the data. * It's less work. * Some vendors may legitimately have case-sensitive checks for these attributes which would fail on LLVM generated object files. * There could be locale issues with uppercasing. The original reasons for uppercasing appear to have stemmed from an old codesourcery toolchain behaviour, see http://comments.gmane.org/gmane.comp.compilers.llvm.cvs/87133 This patch makes the object file emitted no longer captialise string data, it encodes as seen in the assembly source. Change-Id: Ibe20dd6e60d2773d57ff72a78470839033aa5538 llvm-svn: 222882
* Update AArch64 ELF relocations to ABI 1.0Will Newton2014-11-263-4/+82
| | | | | | | | | | | | | | | | | | | | 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-263-0/+2
| | | | | | Add R_ARM_IRELATIVE. llvm-svn: 222817
* Forgot to add a file for r222734David Majnemer2014-11-251-0/+0
| | | | llvm-svn: 222736
* COFF: Add another test for r222124David Majnemer2014-11-251-0/+2
| | | | llvm-svn: 222734
* [ELF] Prevent ARM ELF object writer from generating deprecated relocation ↵Jyoti Allur2014-11-201-1/+0
| | | | | | code R_ARM_PLT32 llvm-svn: 222414
* Add a test for r221870David Majnemer2014-11-202-0/+8
| | | | | | | bad-relocs.obj.coff-i386 has a relocation whose symbol index is outside the symbol table. llvm-svn: 222413
* llvm-readobj: fix off-by-one error in COFFDumperRui Ueyama2014-11-191-17/+21
| | | | | | | | It printed out base relocation table header as table entry. This patch also makes llvm-readobj to not skip ABSOLUTE entries becuase it was confusing. llvm-svn: 222299
* llvm-readobj: teach it how to dump COFF base relocation tableRui Ueyama2014-11-192-0/+20
| | | | llvm-svn: 222289
* llvm-readobj: Don't print the Characteristics field as the SubsystemDavid Majnemer2014-11-182-2/+2
| | | | | | | We claimed that we were printing the Subystem field when we were actually printing the Characteristics field. llvm-svn: 222216
* Object, COFF: Tighten the object file parserDavid Majnemer2014-11-171-5/+4
| | | | | | | | | | | | We were a little lax in a few areas: - We pretended that import libraries were like any old COFF file, they are not. In fact, they aren't really COFF files at all, we should probably grow some specialized functionality to handle them smarter. - Our symbol iterators were more than happy to attempt to go past the end of the symbol table if you had a symbol with a bad list of auxiliary symbols. llvm-svn: 222124
* Implement MachODumper::printFileHeadersFrederic Riss2014-11-171-0/+92
| | | | | | | | Patch by Chilledheart. Differential Revision: http://reviews.llvm.org/D6163 llvm-svn: 222115
* llvm-readobj: Print out address table when dumping COFF delay-import tableRui Ueyama2014-11-131-4/+16
| | | | llvm-svn: 221855
* [COFF] Make it clearer that the symbols subsection holds function display ↵Timur Iskhodzhanov2014-11-121-10/+10
| | | | | | name rather than just name llvm-svn: 221812
* llvm-readobj: Add support for dumping the DOS header in PE filesDavid Majnemer2014-11-051-0/+19
| | | | llvm-svn: 221333
* PR21189: Teach llvm-readobj to dump bits of COFF symbol subsections required ↵Timur Iskhodzhanov2014-10-231-18/+76
| | | | | | | | | to debug using VS2012+ Reviewed at http://reviews.llvm.org/D5755 Thanks to Andrey Guskov for his help investigating this! llvm-svn: 220526
* Add VS2012-generated test inputs for ↵Timur Iskhodzhanov2014-10-136-4/+14
| | | | | | test/tools/llvm-readobj/codeview-linetables.test llvm-svn: 219621
* llvm-readobj: add test for r219228Rui Ueyama2014-10-082-0/+2
| | | | llvm-svn: 219274
* Fix dumping codeview line tables when there are multiple debug sectionsTimur Iskhodzhanov2014-10-062-19/+59
| | | | | | | | | | 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 out the fields of the COFF delay-import tableRui Ueyama2014-10-031-0/+12
| | | | llvm-svn: 218996
* llvm-readobj: print COFF delay-load import tableRui Ueyama2014-10-033-12/+32
| | | | | | | | | 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-023-4/+20
| | | | llvm-svn: 218924
* llvm-readobj: print COFF imported symbolsRui Ueyama2014-10-021-0/+4
| | | | | | | | This patch defines a new iterator for the imported symbols. Make a change to COFFDumper to use that iterator to print out imported symbols and its ordinals. llvm-svn: 218915
* This patch adds a new flag "-coff-imports" to llvm-readobj.Rui Ueyama2014-10-023-0/+24
| | | | | | | | | | | | | | 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-239-4/+38
| | | | | | Also provide reproducible instructions llvm-svn: 218303
* llvm-readobj: pretty-print special COFF section namesDavid Majnemer2014-09-204-6/+6
| | | | | | Print IMAGE_SYM_DEBUG and the like instead of (-2). llvm-svn: 218172
* yaml2obj: Support bigobjDavid Majnemer2014-09-162-4/+4
| | | | | | | | | | | | | | | | Teach yaml2obj how to make a bigobj COFF file. Like the rest of LLVM, we automatically decide whether or not to use regular COFF or bigobj COFF on the fly depending on how many sections the resulting object would have. This ends the task of adding bigobj support to LLVM. N.B. This was tested by forcing yaml2obj to be used in bigobj mode regardless of the number of sections. While a dedicated test was written, the smallest I could make it was 36 MB (!) of yaml and it still took a significant amount of time to execute on a powerful machine. llvm-svn: 217858
OpenPOWER on IntegriCloud