summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objdump
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-objdump][MachO] Use the -dsym file name when reporting errorsFrancis Visoiu Mistrih2019-01-101-0/+7
| | | | | | Instead of using the binary filename. llvm-svn: 350849
* [llvm-objdump][MachO] Correctly handle the llvm::Error when -dsym has errorsFrancis Visoiu Mistrih2019-01-101-0/+3
| | | | | | | | | In an assert build, the Error gets destroyed and we get "Program aborted due to an unhandled Error:". In release, we get an empty message. llvm-svn: 350848
* [llvm-objdump] - Do not include reserved undefined symbol in -t output.George Rimar2019-01-103-3/+0
| | | | | | | | | | | | | | | | | | | | This is https://bugs.llvm.org/show_bug.cgi?id=26892, GNU objdump hides the special symbol entry: SYMBOL TABLE: 000000000000a7e0 l F .text 00000000000003f9 bi_copymodules while llvm-objdump does not: SYMBOL TABLE: 0000000000000000 *UND* 00000000 000000000000a7e0 l F .text 000003f9 bi_copymodules Patch makes the behavior of the llvm-objdump to be consistent with the GNU objdump. Differential revision: https://reviews.llvm.org/D56076 llvm-svn: 350840
* [llvm-objdump] - Print symbol addressed when dumping disassembly output (-d)George Rimar2019-01-091-0/+29
| | | | | | | | | | | | | | | | | | | | When GNU objdump dumps the input with -d it prints the symbol addresses, for example: 0000000000000031 <foo>: 31: 00 00 add %al,(%rax) ... llvm-objdump currently does not do that. Patch changes the behavior to match the GNU objdump. That is useful for implementing -z/--disassemble-zeroes (D56083), it allows omitting first zero bytes and keep the information about the symbol address in the output. Differential revision: https://reviews.llvm.org/D56123 llvm-svn: 350726
* [llvm-objdump] - Demangle the symbols when printing symbol table and ↵George Rimar2018-12-191-0/+23
| | | | | | | | | | | | | | | relocations. This is https://bugs.llvm.org/show_bug.cgi?id=40009, llvm-objdump does not demangle the symbols when prints symbol table and/or relocations. Patch teaches it to do that. Differential revision: https://reviews.llvm.org/D55821 llvm-svn: 349613
* [COFF] Map truncated .eh_frame section nameMartin Storsjo2018-12-082-0/+132
| | | | | | | | | | | | | | | PE/COFF sections can have section names truncated to 8 chars, in order to have the name available at runtime. (The string table, where long untruncated names are stored, isn't loaded at runtime.) This allows various llvm tools to dump the .eh_frame section from such executables. Patch by Peiyuan Song! Differential Revision: https://reviews.llvm.org/D55407 llvm-svn: 348708
* [commit-test] Add blank line for test/tools/llvm-objdump/symbol-table-elf.testXing GUO2018-11-151-0/+1
| | | | | | | | | | | | | | Summary: Test commit Reviewers: Higuoxing Reviewed By: Higuoxing Subscribers: llvm-commits, Higuoxing Differential Revision: https://reviews.llvm.org/D54562 llvm-svn: 346924
* [commit test] Add blank line to test/tools/llvm-objdump/full-contents.testXing GUO2018-11-131-0/+1
| | | | llvm-svn: 346729
* [llvm-objdump] add more constraints for testsFangrui Song2018-11-122-4/+8
| | | | | | | | | | | | Patch by Higuoxing (Xing) Reviewers: jhenderson Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D54299 llvm-svn: 346636
* [llvm-objdump] Add symbol 'O' for object dataKristina Brooks2018-11-114-11/+11
| | | | | | | | | | | | | Improve compatibility with GNU objdump by showing `O` next to global symbol names, instead of a blank space. Patch by Higuoxing (Xing). Reviewers: MaskRay Differential Revision: https://reviews.llvm.org/D54380 llvm-svn: 346610
* [WebAssembly] Update test cases after FixFunctionBitcastsHeejin Ahn2018-11-073-7/+9
| | | | | | | | | | | | | | Summary: This updates generated binaries and corresponding test cases up to date after applying FixFunctionBitcasts pass. Reviewers: sbc100 Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D54070 llvm-svn: 346286
* [llvm-objdump] Add --reloc alias for -r (PR39407)Kristina Brooks2018-10-311-0/+73
| | | | | | | | | | | | | This addresses PR39407 (https://bugs.llvm.org/show_bug.cgi?id=39407) improving compatibility with GNU binutils counterparts. Reviewed By: kristina Patch by Higuoxing (Xing). Differential Revision: https://reviews.llvm.org/D53804 llvm-svn: 345703
* [llvm-objdump] support '--syms' as an alias of -tKristina Brooks2018-10-311-0/+47
| | | | | | | | | | | This adds support for '--syms' as an alias of '-t' for llvm-objdump, fixing PR39406 (https://bugs.llvm.org/show_bug.cgi?id=39406). Patch by Higuoxing (Xing). Differential Revision: https://reviews.llvm.org/D53803 llvm-svn: 345697
* [llvm-objdump] Don't crash when using `-a` on non-archivesJames Henderson2018-10-291-0/+25
| | | | | | | | | | | | | This fixes PR39402. The crash was caused when dereferencing nullptr in DumpObject and printArchiveChild. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D53690 Patch by Xing GUO llvm-svn: 345503
* [llvm-objdump] Add '--full-contents' as alias for '-s'James Henderson2018-10-291-0/+47
| | | | | | | | | | | | This fixes PR39404. Reviewed By: jhenderson Patch by Xing Guo Differential Revision: https://reviews.llvm.org/D53576 llvm-svn: 345495
* [llvm-objdump] Fix --file-headers (-f) optionPetar Jovanovic2018-10-193-5/+5
| | | | | | | | | | | | | | | | | Changed the format call to match the surrounding code. Previously it was printing an unsigned int while the return type being printed was long unsigned int or wider. This caused problems for big-endian systems which were discovered on mips64. Also, the printed address had less characters than it should because the character count was directly obtained from the number of bytes in the address. The tests were adapted to fit this fix and now use longer addresses. Patch by Milos Stojanovic. Differential Revision: https://reviews.llvm.org/D53403 llvm-svn: 344818
* Make malformed-machos.test pass on my Mac.Nico Weber2018-09-111-1/+1
| | | | | | | For some reason, llvm-objdump defaults to -arch=i386 on this system while the test checks x86_64 output. Explicitly pass -arch=x86_64. llvm-svn: 341944
* [MachO] Fix inconsistency between error messages when validating LC_DYSYMTABFrancis Visoiu Mistrih2018-09-041-1/+1
| | | | llvm-svn: 341379
* [MachO] Fix LC_DYSYMTAB validation for external symbolsFrancis Visoiu Mistrih2018-09-041-0/+51
| | | | | | | We were validating the same index (ilocalsym) twice, while iextdefsym was never validated. llvm-svn: 341378
* [llvm-objdump] Keep the memory buffer from the dSYM alive when using -g -dsymFrancis Visoiu Mistrih2018-08-311-0/+4
| | | | | | | | | | When using -g and -dsym, llvm-objdump opens the dsym file and keeps the MachOObjectFile alive, while the memory buffer that the MachOObjectFile was based on gets destroyed. Differential Revision: https://reviews.llvm.org/D51365 llvm-svn: 341209
* AMDGPU: Remove remnants of old address space mappingMatt Arsenault2018-08-311-4/+4
| | | | llvm-svn: 341165
* [llvm-objdump] Label calls to the PLT.Joel Galenson2018-08-245-0/+19
| | | | | | Differential Revision: https://reviews.llvm.org/D50204 llvm-svn: 340611
* [llvm-objdump] Add ability to demangle COFF symbols.Zachary Turner2018-08-201-7/+1
| | | | llvm-svn: 340221
* objdump: Better handling of Mach-O universal binariesDave Lee2018-08-032-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: With Mach-O, there is a flag requirement discrepancy between working with universal binaries and thin binaries. Many flags that don't require the `-macho` flag (for example `-private-headers` and `-disassemble`) fail to work on universal binaries unless `-macho` is given. When this happens, the error message is unhelpful, stating: The file was not recognized as a valid object file. Which can lead to confusion. This change allows generic flags to be used on universal binaries with and without the `-macho` flag. This means flags that can be used for thin files can be used consistently with fat files too. To do this, the universal binary support within `ParseInputMachO()` is extracted into a new function. This new function is called directly from `DumpInput()` when the input binary is universal. Additionally the `-arch` flag validation in `ParseInputMachO()` was extracted to be reused. Reviewers: compnerd Reviewed By: compnerd Subscribers: keith, llvm-commits Differential Revision: https://reviews.llvm.org/D48702 llvm-svn: 338792
* [llvm-objdump] Add dynamic section printing to private-headers optionPaul Semel2018-07-254-0/+96
| | | | | | Differential Revision: https://reviews.llvm.org/D49016 llvm-svn: 337902
* [llvm-objdump] Add -demangle (-C) optionPaul Semel2018-07-181-0/+47
| | | | | | Differential Revision: https://reviews.llvm.org/D49043 llvm-svn: 337401
* [llvm-objdump] - Stop reporting bogus section IDs.George Rimar2018-07-181-0/+25
| | | | | | | | | | | | | | | | Imagine we have a file with few sections, and one of them is .foo with index N != 0. Problem is that when llvm-objdump is given a -section=.foo parameter it lists .foo as a section at index 0. That makes impossible to write test cases which needs to find the index of the particular section, while ignoring dumping of others. The patch fixes that. Differential revision: https://reviews.llvm.org/D49372 llvm-svn: 337361
* Revert "[llvm-objdump] Add -demangle (-C) option"Paul Semel2018-07-111-47/+0
| | | | | | | This reverts commit 3a44ccd156e0edd2e89226f8ed63928e227900bb. This reverts commit d5cfc836bb5552e20507d3612d13ff66ff9e36a0. llvm-svn: 336829
* Fix llvm-objdump demangle test (added triple option)Paul Semel2018-07-111-5/+5
| | | | llvm-svn: 336821
* [llvm-objdump] Add -demangle (-C) optionPaul Semel2018-07-111-0/+47
| | | | | | Differential Revision: https://reviews.llvm.org/D49043 llvm-svn: 336816
* Reapply: "objdump: Support newer ObjC image info flags"Dave Lee2018-07-061-0/+7
| | | | | | | | | | | | | | | | | | | | | Summary: Add support for two additional ObjC image info flags: `IS_SIMULATED` and `HAS_CATEGORY_CLASS_PROPERTIES`. `IS_SIMULATED` indicates a Mach-O binary built for iOS simulator. `HAS_CATEGORY_CLASS_PROPERTIES` indicates a Mach-O binary built by a compiler that supports class properties in categories. Reviewers: enderby, compnerd Reviewed By: compnerd Subscribers: keith, llvm-commits Differential Revision: https://reviews.llvm.org/D48568 llvm-svn: 336411
* Revert "objdump: Support newer ObjC image info flags"Dave Lee2018-07-061-7/+0
| | | | | | This reverts commit 8c4cc472e7a67bd3b2b20cc4cf32d31af29bc7e9. llvm-svn: 336402
* objdump: Support newer ObjC image info flagsDave Lee2018-07-051-0/+7
| | | | | | | | | | | | | | | | | | | | | Summary: Add support for two additional ObjC image info flags: `IS_SIMULATED` and `HAS_CATEGORY_CLASS_PROPERTIES`. `IS_SIMULATED` indicates a Mach-O binary built for iOS simulator. `HAS_CATEGORY_CLASS_PROPERTIES` indicates a Mach-O binary built by a compiler that supports class properties in categories. Reviewers: enderby, compnerd Reviewed By: compnerd Subscribers: keith, llvm-commits Differential Revision: https://reviews.llvm.org/D48568 llvm-svn: 336399
* [llvm-objdump] Removed archive-headers-disas testPaul Semel2018-07-051-29/+0
| | | | | | | | This test is failing because of the disas part. For the moment, I will juste remove it. I will add it again tomorrow with a proper fix. llvm-svn: 336370
* [llvm-objcopy] Fix timezone dependant testsPaul Semel2018-07-052-18/+18
| | | | llvm-svn: 336363
* [llvm-objdump] Add --archive-headers (-a) optionPaul Semel2018-07-053-0/+50
| | | | llvm-svn: 336357
* [llvm-objdump] Add --file-headers (-f) optionPaul Semel2018-07-044-0/+63
| | | | llvm-svn: 336284
* Require x86 for this test.Sterling Augustine2018-06-281-0/+1
| | | | llvm-svn: 335939
* Some targets don't have lld built, so just use a binary copySterling Augustine2018-06-282-3/+1
| | | | | | of the input file. llvm-svn: 335908
* Handle absolute symbols as branch targets in disassembly.Sterling Augustine2018-06-281-0/+4
| | | | | | https://reviews.llvm.org/D48554 llvm-svn: 335903
* ARM: add binary file git swallowed.Tim Northover2018-06-262-0/+0
| | | | | | Should fix bots. llvm-svn: 335596
* ARM: diagnose unpredictable IT instructionsTim Northover2018-06-261-0/+10
| | | | | | | | | | | IT instructions are allowed to have the 'AL' predicate, but it must never result in an 'NV' predicated instruction. Essentially this means that all branches must be 't' rather than 'e' if the predicate is 'AL'. This patch adds a diagnostic for this during assembly (error because parsing hits an assertion if allowed to continue) and an annotation during disassembly. llvm-svn: 335593
* [SelectionDAG] Remove debug locations from ConstantSD(FP)NodesVedant Kumar2018-06-251-4/+4
| | | | | | | | | | | | | | | | | | This removes debug locations from ConstantSDNode and ConstantSDFPNode. When this kind of node is materialized we no longer create a line table entry which jumps back to the constant's first point of use. This makes single-stepping behavior smoother, and it matches the model used by IR, where Constants have no locations. See this thread for more context: http://lists.llvm.org/pipermail/llvm-dev/2018-June/124164.html I'd like to handle constant BuildVectorSDNodes and to try to eliminate passing SDLocs to SelectionDAG::getConstant*() in follow-up commits. Differential Revision: https://reviews.llvm.org/D48468 llvm-svn: 335497
* [WebAsembly] Update default triple in test files to wasm32-unknown-unkown.Sam Clegg2018-05-102-2/+2
| | | | | | | | | | Summary: The final -wasm component has been the default for some time now. Subscribers: jfb, dschuff, jgravelle-google, eraman, aheejin, JDevlieghere, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D46342 llvm-svn: 332007
* [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label.Shiva Chen2018-05-093-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to set breakpoints on labels and list source code around labels, we need collect debug information for labels, i.e., label name, the function label belong, line number in the file, and the address label located. In order to keep these information in LLVM IR and to allow backend to generate debug information correctly. We create a new kind of metadata for labels, DILabel. The format of DILabel is !DILabel(scope: !1, name: "foo", file: !2, line: 3) We hope to keep debug information as much as possible even the code is optimized. So, we create a new kind of intrinsic for label metadata to avoid the metadata is eliminated with basic block. The intrinsic will keep existing if we keep it from optimized out. The format of the intrinsic is llvm.dbg.label(metadata !1) It has only one argument, that is the DILabel metadata. The intrinsic will follow the label immediately. Backend could get the label metadata through the intrinsic's parameter. We also create DIBuilder API for labels to be used by Frontend. Frontend could use createLabel() to allocate DILabel objects, and use insertLabel() to insert llvm.dbg.label intrinsic in LLVM IR. Differential Revision: https://reviews.llvm.org/D45024 Patch by Hsiangkai Wang. llvm-svn: 331841
* typoSam Clegg2018-04-271-0/+0
| | | | llvm-svn: 331006
* [WebAssembly] Section symbols must have local bindingSam Clegg2018-04-271-0/+0
| | | | | | | | | | Summary: Also test for symbols information in test/MC/WebAssembly/debug-info.ll. Subscribers: jfb, dschuff, jgravelle-google, aheejin, sunfish, JDevlieghere, llvm-commits Differential Revision: https://reviews.llvm.org/D46160 llvm-svn: 331005
* [WebAssembly] Add version to object file metadataSam Clegg2018-04-262-1/+1
| | | | | | | | | | Summary: See https://github.com/WebAssembly/tool-conventions/issues/54 Subscribers: jfb, dschuff, jgravelle-google, aheejin, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D46069 llvm-svn: 330969
* [WebAssembly] objdump: Don't assume all relocations have symbolsSam Clegg2018-04-261-4/+12
| | | | | | | | Subscribers: jfb, dschuff, jgravelle-google, aheejin, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D46134 llvm-svn: 330959
* [WebAssembly] Implement getRelocationValueString()Sam Clegg2018-04-261-1/+1
| | | | | | | | And use it in llvm-objdump. Differential Revision: https://reviews.llvm.org/D46092 llvm-svn: 330957
OpenPOWER on IntegriCloud