summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objdump/ARM
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-objdump] Add the missing ARMv8 subarch detectionYi Kong2019-08-282-0/+21
| | | | | | Differential Revision: https://reviews.llvm.org/D66849 llvm-svn: 370163
* [llvm-objdump] Switch between ARM/Thumb based on mapping symbols.Eli Friedman2019-06-201-4/+4
| | | | | | | | | | | | | | | The ARMDisassembler changes allow changing between ARM and Thumb mode based on the MCSubtargetInfo, rather than the Target, which simplifies the other changes a bit. I'm not really happy with adding more target-specific logic to tools/llvm-objdump/, but there isn't any easy way around it: the logic in question specifically applies to disassembling an object file, and that code simply isn't located in lib/Target, at least at the moment. Differential Revision: https://reviews.llvm.org/D60927 llvm-svn: 363903
* [llvm-objdump] Support arg grouping for -j and -M (e.g. llvm-objdump -sj.foo ↵Jordan Rupprecht2019-03-211-0/+18
| | | | | | | | | | | | | | | | | | | | | | | -dMreg-names-raw) Summary: r354375 added support for most objdump groupings, but didn't add support for -j|--sections, because that wasn't possible. r354870 added --disassembler options, but grouping still wasn't available. r355185 supported values for grouped options. This just puts the three of them together. This supports -j in modes like `-s -j .foo`, `-sj .foo`, `-sj=.foo`, or `-sj.foo`, and similar for `-M`. Reviewers: ormris, jhenderson, ikudrin Reviewed By: jhenderson, ikudrin Subscribers: javed.absar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59618 llvm-svn: 356697
* [llvm-objdump] Implement -Mreg-names-raw/-std options.Igor Kudrin2019-02-261-0/+18
| | | | | | | | | | | | | | The --disassembler-options, or -M, are used to customize the disassembler and affect its output. The two implemented options allow selecting register names on ARM: * With -Mreg-names-raw, the disassembler uses rNN for all registers. * With -Mreg-names-std it prints sp, lr and pc for r13, r14 and r15, which is the default behavior of llvm-objdump. Differential Revision: https://reviews.llvm.org/D57680 llvm-svn: 354870
* ARM: add binary file git swallowed.Tim Northover2018-06-262-0/+10
| | | | | | Should fix bots. llvm-svn: 335596
* [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
* [llvm-objdump] Handle invalid instruction gracefully on ARMEugene Leviant2017-06-291-0/+9
| | | | | | Differential revision: https://reviews.llvm.org/D34813 llvm-svn: 306687
* Fix llvm-objdump so it picks a good CPU based for Mach-O filesKevin Enderby2017-01-242-0/+3
| | | | | | | | | | | for CPU_SUBTYPE_ARM_V7S and CPU_SUBTYPE_ARM_V7K. For these two cpusubtypes they should default to a cortex-a7 CPU to give proper disassembly without a -mcpu= flag. rdar://27431703 llvm-svn: 292993
* [ARM] Create SubtargetFeatures from build attrsSam Parker2017-01-187-0/+163
| | | | | | | | | | | An ELFObjectFile can now create SubtargetFeatures from the available ARM build attributes, in a similar manner to MIPS. I've moved the MIPS code into its own function and the ARM handler also has a separate function. Differential Revision: https://reviews.llvm.org/D28291 llvm-svn: 292403
* [ARM] Create objdump subtarget from build attrsSam Parker2017-01-188-0/+74
| | | | | | | | | | | Enable an ELFObjectFile to read the its arm build attributes to produce a target triple with a specific ARM architecture. llvm-objdump now uses this functionality to automatically produce a more accurate target. Differential Revision: https://reviews.llvm.org/D28769 llvm-svn: 292366
* Revert r291903 and r291898. Reason: they break check-lld on the bots.Ivan Krasin2017-01-138-74/+0
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Revert [ARM] Fix ubig32_t read in ARMAttributeParser Now using support functions to read data instead of trying to perform casts. =========================================================== Revert [ARM] Enable objdump to construct triple for ARM Now that The ARMAttributeParser has been moved into the library, it has been modified so that it can parse the attributes without printing them and stores them in a map. ELFObjectFile now queries the attributes to fill out the architecture details of a provided triple for 'arm' and 'thumb' targets. llvm-objdump uses this new functionality. Subscribers: llvm-commits, samparker, aemerson, mgorny Differential Revision: https://reviews.llvm.org/D28683 llvm-svn: 291911
* [ARM] Enable objdump to construct triple for ARMSam Parker2017-01-138-0/+74
| | | | | | | | | | | | | Now that The ARMAttributeParser has been moved into the library, it has been modified so that it can parse the attributes without printing them and stores them in a map. ELFObjectFile now queries the attributes to fill out the architecture details of a provided triple for 'arm' and 'thumb' targets. llvm-objdump uses this new functionality. Differential Revision: https://reviews.llvm.org/D28281 llvm-svn: 291898
* Fix a bugs with using some Mach-O command line flags like "-arch armv7m".Kevin Enderby2016-12-162-0/+5
| | | | | | | | | | | | | | | | | | The Mach-O command line flag like "-arch armv7m" does not match the arch name part of its llvm Triple which is "thumbv7m-apple-darwin”. I think the best way to fix this is to have llvm::object::MachOObjectFile::getArchTriple() optionally return the name of the Mach-O arch flag that would be used with -arch that matches the CPUType and CPUSubType. Then change llvm::object::MachOUniversalBinary::ObjectForArch::getArchTypeName() to use that and change it to getArchFlagName() as the type name is really part of the Triple and the -arch flag name is a Mach-O thing for a specific Triple with a specific Mcpu value. rdar://29663637 llvm-svn: 290001
* For llvm-objdump for Mach-O files add printing ofKevin Enderby2016-10-212-0/+13
| | | | | | | | | | | | the ARM_THREAD_STATE in the same format as otool-classic(1) on darwin. Also remove an extra space in printing the initprot to make the output match otool-classic(1) on darwin. rdar://28851457 llvm-svn: 284852
* llvm-objdump: ELF: Handle code and data mix in all scenariosHemant Kulkarni2016-08-251-0/+36
| | | | | | Differential Revision: https://reviews.llvm.org/D23621 llvm-svn: 279770
* llvm-objdump: extend __mh_execute_header handling to other special symsTim Northover2016-07-142-0/+7
| | | | | | | | | | We don't need to print any of the special __mh_*_header symbols when disassembling. Since they point at the beginning of the segment (not where the actual code is) they're pretty misleading. Should also fix lld bots. llvm-svn: 275498
* Update llvm-objdump for disassembly of ARM Mach-O files to always include ↵Kevin Enderby2016-04-281-4/+4
| | | | | | | | | | the opcode bytes. As this is the expected behavior of the old darwin otool(1) for ARM Mach-O files. rdar://25896249 llvm-svn: 267929
* llvm-objdump: deal with invalid ARM encodings slightly better.Tim Northover2016-04-222-2/+10
| | | | | | | | | | | | | | Before we printed a warning to stderr and left the actual output stream in a mess. This tries to print a .long or .short representation of what we saw (as if there was a data-in-code directive). This isn't guaranteed to restore synchronization in Thumb-mode (if the invalid instruction was supposed to be 32-bits, we may be off-by-16 for the rest of the function). But there's no certain way to deal with that, and it's invalid code anyway (if the data really wasn't an instruction, the user can add proper .data_in_code directives if they care) llvm-svn: 267250
* MachO: remove weird ARM/Thumb interface from MachOObjectFileTim Northover2016-04-221-0/+10
| | | | | | | | | | | | | | | | Only one consumer (llvm-objdump) actually cared about the fact that there were two triples. Others were actively working around the fact that the Triple returned by getArch might have been invalid. As for llvm-objdump, it needs to be acutely aware of both Triples anyway, so being generic in the exposed API is no benefit. Also rename the version of getArch returning a Triple. Users were having to pass an unwanted nullptr to disambiguate the two, which was nasty. The only functional change here is that armv7m and armv7em object files no longer crash llvm-objdump. llvm-svn: 267249
* Revert r265817Colin LeMahieu2016-04-081-2/+2
| | | | | | lld tests need to be addressed. llvm-svn: 265822
* [llvm-objdump] Printing hex instead of dec by defaultColin LeMahieu2016-04-081-2/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D18770 llvm-svn: 265817
* Have MachOObjectFile::isValidArch() accept armv7Frederic Riss2015-06-161-0/+1
| | | | llvm-svn: 239833
* Add the option, -non-verbose to llvm-objdump used with -macho to print thingsKevin Enderby2015-03-131-0/+8
| | | | | | | | | | using numeric values and not their symbolic constant names. The routines that print Mach-O stuff already had a verbose parameter and this change is just changing the passing true to passing !NonVerbose. With just a couple of fixes and a bunch of test case updates. llvm-svn: 232182
* Add the option, -data-in-code, to llvm-objdump used with -macho to print the ↵Kevin Enderby2015-01-232-0/+8
| | | | | | Mach-O data in code table. llvm-svn: 226921
* Add printing the LC_ENCRYPTION_INFO load command with llvm-objdump’s ↵Kevin Enderby2014-12-161-0/+5
| | | | | | -private-headers. llvm-svn: 224390
* Fix a bug in llvm-objdump’s -private-headers for the LC_VERSION_MIN_IPHONEOSKevin Enderby2014-12-161-0/+4
| | | | | | load command not getting printed. llvm-svn: 224376
* Fix a bug in llvm-objdump’s -private-headers for 32-bit Mach-O filesKevin Enderby2014-12-161-0/+336
| | | | | | printing the section header. And add some tests for this for 32-bit files. llvm-svn: 224302
* Plumb in the ARM thumb symbolizer in llvm-objdump’s Mach-O disassembler andKevin Enderby2014-11-064-0/+23
| | | | | | | | | | | | add the code and test cases for 32-bit ARM symbolizer. Also fixed the printing of data in code as it was not using the table correctly and needed to fix one of the test cases too. This will break lld’s test/mach-o/arm-interworking-movw.yaml till the tweak for that is made. Which I’ll be committing immediately after this commit. llvm-svn: 221470
* Make llvm-objdump handle both arm and thumb disassembly from the same Mach-OKevin Enderby2014-08-181-0/+15
| | | | | | | | | | file with -macho, the Mach-O specific object file parser option. After some discussion I chose to do this implementation contained in the logic of llvm-objdump’s MachODump.cpp using a second disassembler for thumb when needed and with updates mostly contained in the MachOObjectFile class. llvm-svn: 215931
* llvm/test/tools/llvm-objdump: Reorganize target-dependent some tests.NAKAMURA Takumi2014-08-073-0/+17
llvm-svn: 215122
OpenPOWER on IntegriCloud