summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objdump
Commit message (Collapse)AuthorAgeFilesLines
...
* [WebAssembly] Use section index in relocation section headerSam Clegg2018-04-241-0/+0
| | | | | | | | | | | Rather than referring to sections my their code, use the absolute index of the target section within the module. See https://github.com/WebAssembly/tool-conventions/issues/52 Differential Revision: https://reviews.llvm.org/D45980 llvm-svn: 330749
* [llvm-objdump] Remove test object fileFrancis Visoiu Mistrih2018-04-191-0/+0
| | | | | | Forgot to remove it from the previous commit. llvm-svn: 330343
* [llvm-objdump] Print "..." instead of random data for virtual sectionsFrancis Visoiu Mistrih2018-04-192-0/+9
| | | | | | | | | | | | | | | | | When disassembling with -D, skip virtual sections by printing "..." for each symbol. This patch also implements `MachOObjectFile::isSectionVirtual`. Test case comes from: ``` .zerofill __DATA,__common,_data64unsigned,472,3 ``` Differential Revision: https://reviews.llvm.org/D45824 llvm-svn: 330342
* [WebAssembly] libObject: Don't include the name the size of custom sectionsSam Clegg2018-04-121-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D45579 llvm-svn: 329947
* [AArch64] Decorate AArch64 instrs with OPERAND_PCRELRafael Auler2018-03-271-0/+3
| | | | | | | | | | | | | | Summary: This is a canonical way to teach objdump to print the target symbols for branches when disassembling AArch64 code. Reviewers: evandro, t.p.northover, espindola Reviewed By: t.p.northover Differential Revision: https://reviews.llvm.org/D44851 llvm-svn: 328638
* For llvm-objdump and Mach-O files, fix the printing of module init andKevin Enderby2018-03-202-0/+4
| | | | | | | | | | | term sections from .o files to look to see if the pointers have a relocation entry and if so print the symbol name from the relocation entry. If not fall back to the existing code and use the pointer value to look up that value in the symbol table. rdar://38337506 llvm-svn: 328037
* [llvm-objdump] Support disassembling by symbol nameRafael Auler2018-03-091-0/+20
| | | | | | | | | | | | | Summary: Add a new option -df to llvm-objdump that takes function names as arguments and instructs the disassembler to only dump those function contents. Based on code originally written by Bill Nell. Reviewers: espindola, JDevlieghere Differential Revision: https://reviews.llvm.org/D44224 llvm-svn: 327164
* [WebAssembly] Reorder reloc sections to come between symtab and nameNicholas Wilson2018-03-052-2/+2
| | | | | | | | | | | This is required in order to enable relocs to be validated as they are read in. Also update tests with new section ordering. Differential Revision: https://reviews.llvm.org/D43940 llvm-svn: 326694
* [WebAssembly] Update pre-generated test files to match latest llc output. NFC.Nicholas Wilson2018-03-013-3/+3
| | | | | | | | The ordering of llc's output was changed in rL326334. Differential Revision: https://reviews.llvm.org/D43941 llvm-svn: 326445
* [DebugInfo] Fix buildbot failure on non-X86 targetsScott Linder2018-02-241-0/+1
| | | | llvm-svn: 326035
* [DebugInfo] Add remaining files to r325970Scott Linder2018-02-232-0/+22
| | | | | | Add files which I missed in the original check-in llvm-svn: 325973
* [WebAssembly] Add first claass symbol table to wasm objectsSam Clegg2018-02-233-13/+8
| | | | | | | | | | | | | | | | | | | | This is combination of two patches by Nicholas Wilson: 1. https://reviews.llvm.org/D41954 2. https://reviews.llvm.org/D42495 Along with a few local modifications: - One change I made was to add the UNDEFINED bit to the binary format to avoid the extra byte used when writing data symbols. Although this bit is redundant for other symbols types (i.e. undefined can be implied if a function or global is a wasm import) - I prefer to be explicit and consistent and not have derived flags. - Some field renaming. - Some reverting of unrelated minor changes. - No test output differences. Differential Revision: https://reviews.llvm.org/D43147 llvm-svn: 325860
* AMDGPU: Bring processors and features in sync with the specKonstantin Zhuravlyov2018-02-161-3/+3
| | | | | | | | | | - Remove gfx800 - Make iceland gfx802 - Add xnack to gfx902 Differential Revision: https://reviews.llvm.org/D43355 llvm-svn: 325393
* [WebAssebmly] Report undefined symbols correctly in objdumpSam Clegg2018-02-091-4/+4
| | | | | | | | | | | | | | Peviously we were reporting undefined symbol as being defined by the IMPORT sections. This change reports undefined symbols in the same that other formats do, and also removes the need to store the section with each symbol (since it can be derived from the symbol type). Differential Revision: https://reviews.llvm.org/D43101 llvm-svn: 324770
* [WebAssembly] Remove debug names from symbol tableSam Clegg2018-01-171-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Get rid of DEBUG_FUNCTION_NAME symbols. When we actually debug data, maybe we'll want somewhere to put it... but having a symbol that just stores the name of another symbol seems odd. It means you have multiple Symbols with the same name, one containing the actual function and another containing the name! Store the names in a vector on the WasmObjectFile when reading them in. Also stash them on the WasmFunctions themselves. The names are //not// "symbol names" or aliases or anything, they're just the name that a debugger should show against the function body itself. NB. The WasmObjectFile stores them so that they can be exported in the YAML losslessly, and hence the tests can be precise. Enforce that the CODE section has been read in before reading the "names" section. Requires minor adjustment to some tests. Patch by Nicholas Wilson! Differential Revision: https://reviews.llvm.org/D42075 llvm-svn: 322741
* Fix tests after move to utohexstr.Benjamin Kramer2017-12-281-1/+1
| | | | llvm-svn: 321527
* Updated llvm-objdump to display local relocations in Mach-O binariesMichael Trent2017-12-154-6/+13
| | | | | | | | | | | | | | | | | | | | | | | Summary: llvm-objdump's Mach-O parser was updated in r306037 to display external relocations for MH_KEXT_BUNDLE file types. This change extends the Macho-O parser to display local relocations for MH_PRELOAD files. When used with the -macho option relocations will be displayed in a historical format. All tests are passing for llvm, clang, and lld. llvm-objdump builds without compiler warnings. rdar://35778019 Reviewers: enderby Reviewed By: enderby Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41199 llvm-svn: 320832
* reverting out -r320532 because a warning is breaking the lld buildMichael Trent2017-12-134-13/+6
| | | | llvm-svn: 320534
* Updated llvm-objdump to display local relocations in Mach-O binariesMichael Trent2017-12-124-6/+13
| | | | | | | | | | | | | | | | | | Summary: llvm-objdump's Mach-O parser was updated in r306037 to display external relocations for MH_KEXT_BUNDLE file types. This change extends the Macho-O parser to display local relocations for MH_PRELOAD files. When used with the -macho option relocations will be displayed in a historical format. rdar://35778019 Reviewers: enderby Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41061 llvm-svn: 320532
* Reverting r320166 to fix test failures.Michael Trent2017-12-082-6/+0
| | | | llvm-svn: 320174
* Updated llvm-objdump to display local relocations in Mach-O binariesMichael Trent2017-12-082-0/+6
| | | | | | | | | | | | | | | | | | | | Summary: llvm-objdump's Mach-O parser was updated in r306037 to display external relocations for MH_KEXT_BUNDLE file types. This change extends the Macho-O parser to display local relocations for MH_PRELOAD files. When used with the -macho option relocations will be displayed in a historical format. rdar://35778019 Reviewers: enderby Reviewed By: enderby Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D40867 llvm-svn: 320166
* [AMDGPU] Convert test/tools/llvm-objdump/AMDGPU/source-lines.ll to amdgizYaxun Liu2017-11-301-21/+21
| | | | | | Differential Revision: https://reviews.llvm.org/D40653 llvm-svn: 319469
* [AMDGPU][MC][GFX8][GFX9] Corrected names of integer ↵Dmitry Preobrazhensky2017-11-201-2/+2
| | | | | | | | | | | | v_{add/addc/sub/subrev/subb/subbrev} See bug 34765: https://bugs.llvm.org//show_bug.cgi?id=34765 Reviewers: tamazov, SamWot, arsenm, vpykhtin Differential Revision: https://reviews.llvm.org/D40088 llvm-svn: 318675
* llvm-objdump: Add missing requires for the test in r313921Justin Bogner2017-11-161-0/+1
| | | | | | | This test needs an arm backend in addition to the arm64 one that's already checked in the test directory. llvm-svn: 318449
* Fix a crash in llvm-objdump when printing a bad x86_64 relocation in a Mach-OKevin Enderby2017-11-032-0/+3
| | | | | | | | file with a bad section number. rdar://35207539 llvm-svn: 317373
* [wasm] readSection: Avoid reading past eof (fixes oss-fuzz #3219)Vedant Kumar2017-10-232-0/+2
| | | | | | | | | | | | | A wasm file crafted with a bogus section size can trigger an ASan issue in the DWARFObjInMemory constructor. Nip the problem in the bud when we read the wasm section. Found by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3219 Differential Revision: https://reviews.llvm.org/D38777 llvm-svn: 316357
* [Hexagon] New HVX target features.Sumanth Gundapaneni2017-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | This patch lets the llvm tools handle the new HVX target features that are added by frontend (clang). The target-features are of the form "hvx-length64b" for 64 Byte HVX mode, "hvx-length128b" for 128 Byte mode HVX. "hvx-double" is an alias to "hvx-length128b" and is soon will be deprecated. The hvx version target feature is upgated form "+hvx" to "+hvxv{version_number}. Eg: "+hvxv62" For the correct HVX code generation, the user must use the following target features. For 64B mode: "+hvxv62" "+hvx-length64b" For 128B mode: "+hvxv62" "+hvx-length128b" Clang picks a default length if none is specified. If for some reason, no hvx-length is specified to llvm, the compilation will bail out. There is a corresponding clang patch. Differential Revision: https://reviews.llvm.org/D38851 llvm-svn: 316101
* [llvm-objdump] Disable leak checking on an llvm-objdump testFrancis Ricci2017-10-101-1/+1
| | | | | | | | | | | | | | | | Summary: This leak doesn't reproduce locally on macOS 10.12, but is causing buildbot failures. Disable leak checking until it can be fixed. Reviewers: sqlbyme, qcolombet, enderby, bruno Reviewed By: bruno Subscribers: bruno, llvm-commits Differential Revision: https://reviews.llvm.org/D38699 llvm-svn: 315337
* Fix a bug in llvm-objdump when disassembling using the wrong default CPUKevin Enderby2017-09-212-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | in the second slice of a Mach-O universal file. The code in llvm-objdump in in DisassembleMachO() was getting the default CPU then incorrectly setting into the global variable used for the -mcpu option if that was not set. This caused a second call to DisassembleMachO() to use the wrong default CPU when disassembling the next slice in a Mach-O universal file. And would result in bad disassembly and an error message about an recognized processor for the target: % llvm-objdump -d -m -arch all fat.macho-armv7s-arm64 fat.macho-armv7s-arm64 (architecture armv7s): (__TEXT,__text) section armv7: 0: 60 47 bx r12 fat.macho-armv7s-arm64 (architecture arm64): 'cortex-a7' is not a recognized processor for this target (ignoring processor) 'cortex-a7' is not a recognized processor for this target (ignoring processor) (__TEXT,__text) section ___multc3: 0: .long 0x1e620810 rdar://34439149 llvm-svn: 313921
* [WebAssembly] Add support for local symbol bindingsSam Clegg2017-09-201-5/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D38096 llvm-svn: 313817
* [WebAssembly] Use a separate wasm data segment for each global symbolSam Clegg2017-09-141-1/+1
| | | | | | | | | | This is stepping stone towards honoring -fdata-sections and letting the assembler decide how many wasm data segments to create. Differential Revision: https://reviews.llvm.org/D37834 llvm-svn: 313313
* [WebAssembly] Only treat imports/exports as symbols when reading relocatable ↵Sam Clegg2017-09-061-3/+3
| | | | | | | | | | | | | | | | | | | object files This change only treats imported and exports functions and globals as symbol table entries the object has a "linking" section (i.e. it is relocatable object file). In this case all globals must be of type I32 and initialized with i32.const. This was previously being assumed but not checked for and was causing a failure on big endian machines due to using the wrong value of then union. See: https://bugs.llvm.org/show_bug.cgi?id=34487 Differential Revision: https://reviews.llvm.org/D37497 llvm-svn: 312674
* [WebAssembly] Update relocation names to match specSam Clegg2017-09-011-1/+1
| | | | | | | | Summary: See https://github.com/WebAssembly/tool-conventions/blob/master/Linking.md Differential Revision: https://reviews.llvm.org/D37385 llvm-svn: 312342
* [WebAssembly] Fix getSymbolValue() for data symbolsSam Clegg2017-08-311-1/+1
| | | | | | | | | | This is mostly a fix for the output of `llvm-nm` See Bug 34392: https://bugs.llvm.org//show_bug.cgi?id=34392 Differential Revision: https://reviews.llvm.org/D37359 llvm-svn: 312294
* Update test:Konstantin Zhuravlyov2017-08-311-1/+1
| | | | | | | | - REQUIRES: x86_64-linux -> REQUIRES: shell Differential Revision: https://reviews.llvm.org/D37316 llvm-svn: 312245
* Fix test after rL312144Konstantin Zhuravlyov2017-08-301-1/+1
| | | | llvm-svn: 312176
* Canonicalize the representation of empty an expression in ↵Adrian Prantl2017-08-301-1/+1
| | | | | | | | | | | | | | | | DIGlobalVariableExpression This change simplifies code that has to deal with DIGlobalVariableExpression and mirrors how we treat DIExpressions in debug info intrinsics. Before this change there were two ways of representing empty expressions on globals, a nullptr and an empty !DIExpression(). If someone needs to upgrade out-of-tree testcases: perl -pi -e 's/(!DIGlobalVariableExpression\(var: ![0-9]*)\)/\1, expr: !DIExpression())/g' <MYTEST.ll> will catch 95%. llvm-svn: 312144
* [MachO] Use Twines more efficiently.Benjamin Kramer2017-08-202-8/+8
| | | | llvm-svn: 311291
* Add error handling to the dyld compact export entries in libObject.Kevin Enderby2017-07-2013-0/+35
| | | | | | | | | | | | | | | | | | | | | lld needs a matching change for this will be my next commit. Expect it to fail build until that matching commit is picked up by the bots. Like the changes in r296527 for dyld bind entires and the changes in r298883 for lazy bind, weak bind and rebase entries the export entries are the last of the dyld compact info to have error handling added. This follows the model of iterators that can fail that Lang Hanes designed when fixing the problem for bad archives r275316 (or r275361). So that iterating through the exports now terminates if there is an error and returns an llvm::Error with an error message in all cases for malformed input. This change provides the plumbing for the error handling, all the needed testing of error conditions and test cases for all of the unique error messages. llvm-svn: 308690
* [llvm-objdump] Properly print MachO aarch64 addend relocationsMartin Storsjo2017-07-132-0/+6
| | | | | | | | | | Previously such relocations fell into the last case for local symbols, using the relocation addend as symbol index, leading to a crash. Differential Revision: https://reviews.llvm.org/D35239 llvm-svn: 307927
* [llvm-objdump] Correctly distinguish between the MachO upper/lower16 relocationsMartin Storsjo2017-07-132-0/+4
| | | | | | | | | | All other code in MachODump.cpp uses the same comparison, ((r_length & 0x1) == 1), for distinguishing between the two, while the code in llvm-objdump.cpp seemed to be incorrect. Differential Revision: https://reviews.llvm.org/D35240 llvm-svn: 307882
* [WebAssembly] Be consistent in generating trivial test input filesSam Clegg2017-07-105-23/+48
| | | | | | | | | | | | | 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-objdump] Handle invalid instruction gracefully on ARMEugene Leviant2017-06-291-0/+9
| | | | | | Differential revision: https://reviews.llvm.org/D34813 llvm-svn: 306687
* [WebAssembly] Only run WebAssembly objdump tests if it is enabled as a targetSam Clegg2017-06-271-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D34712 llvm-svn: 306464
* [WebAssembly] Add support for printing relocations with llvm-objdumpSam Clegg2017-06-271-0/+8
| | | | | | Differential Revision: https://reviews.llvm.org/D34658 llvm-svn: 306461
* Updated llvm-objdump for arm64 Mach-O MH_KEXT_BUNDLE file types soKevin Enderby2017-06-222-0/+9
| | | | | | | | | it symbolically disassembles the __text section from the __TEXT_EXEC segment not the usual __TEXT segment by default. rdar://30590208 llvm-svn: 306046
* Updated llvm-objdump symbolic disassembly with x86_64 Mach-O MH_KEXT_BUNDLEKevin Enderby2017-06-222-0/+9
| | | | | | | | | file types so it symbolically disassembles operands using the external relocation entries. rdar://31521343 llvm-svn: 306037
* Updated llvm-objdump with Mach-O files and the -objc-meta-data option soKevin Enderby2017-06-201-2/+2
| | | | | | | | that it symbolically prints the superclass when it has dyld bind info for it. rdar://7638823 llvm-svn: 305866
* Change llvm-objdump with Mach-O files and the -info-plist option with theKevin Enderby2017-06-201-0/+4
| | | | | | | | -no-leading-headers option so that it does not print the leading header. rdar://27378808 llvm-svn: 305849
* Fix a FIXME in llvm-objdump for the -exports-trie option that was not addingKevin Enderby2017-06-191-0/+10
| | | | | | | | | | in the base address. Without this Mach-O files, like 64-bit executables, don’t have the correct addresses printed for their exports. As the default is to link at address 0x100000000 not zero. llvm-svn: 305744
OpenPOWER on IntegriCloud