summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objdump
Commit message (Collapse)AuthorAgeFilesLines
...
* llvm-objdump: return non-zero exit code for certain cases of invalid inputAlexey Samsonov2015-06-041-7/+12
| | | | | | | | * If the input file is missing; * If the type of input object file can't be recognized; * If the object file can't be parsed correctly. llvm-svn: 239065
* Disassemble the start of sections even if there is no symbol there.Rafael Espindola2015-06-041-5/+3
| | | | | | | We already handled a section with no symbols, extend that to also handle a section with symbols that don't include the section start. llvm-svn: 239039
* [Object, MachO] Introduce MachOObjectFile::load_commands() range iterator.Alexey Samsonov2015-06-031-65/+18
| | | | | | | | | | | | | | | | | | Summary: Now users don't have to manually deal with getFirstLoadCommandInfo() / getNextLoadCommandInfo(), calculate the number of load segments, etc. No functionality change. Test Plan: regression test suite Reviewers: rafael, lhames, loladiro Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10144 llvm-svn: 238983
* Fix the interpretation of a 0 st_name.Rafael Espindola2015-06-031-11/+24
| | | | | | | | | | | | | | 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
* Move to llvm-objdump a large amount of code to that is only used there.Rafael Espindola2015-06-031-3/+382
| | | | llvm-svn: 238898
* Simplify another function that doesn't fail.Rafael Espindola2015-06-011-3/+1
| | | | llvm-svn: 238703
* Simplify interface of function that doesn't fail.Rafael Espindola2015-05-311-3/+1
| | | | llvm-svn: 238700
* [Objdump] Removing unused parameter.Colin LeMahieu2015-05-291-2/+2
| | | | llvm-svn: 238557
* [Hexagon] Disassembling, printing, and emitting instructions a whole-bundle ↵Colin LeMahieu2015-05-291-3/+61
| | | | | | at a time which is the semantic unit for Hexagon. Fixing tests to use the new format. Disabling tests in the direct object emission path for a followup patch. llvm-svn: 238556
* Removing a switch statement that only contains a default; NFC.Aaron Ballman2015-05-291-4/+1
| | | | llvm-svn: 238552
* [llvm] Adding vdtor to fix warning.Colin LeMahieu2015-05-281-0/+1
| | | | llvm-svn: 238494
* [Objdump] Allow instruction pretty printing to be specialized by the target ↵Colin LeMahieu2015-05-281-6/+28
| | | | | | | | triple. Differential Revision: http://reviews.llvm.org/D8427 llvm-svn: 238457
* [llvm] Parameterizing the output stream for dumpbytes and outputting ↵Colin LeMahieu2015-05-283-23/+9
| | | | | | directly to stream. llvm-svn: 238453
* Make it easier to use DwarfContext with MCJITKeno Fischer2015-05-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This supersedes http://reviews.llvm.org/D4010, hopefully properly dealing with the JIT case and also adds an actual test case. DwarfContext was basically already usable for the JIT (and back when we were overwriting ELF files it actually worked out of the box by accident), but in order to resolve relocations correctly it needs to know the load address of the section. Rather than trying to get this out of the ObjectFile or requiring the user to create a new ObjectFile just to get some debug info, this adds the capability to pass in that info directly. As part of this I separated out part of the LoadedObjectInfo struct from RuntimeDyld, since it is now required at a higher layer. Reviewers: lhames, echristo Reviewed By: echristo Subscribers: vtjnash, friss, rafael, llvm-commits Differential Revision: http://reviews.llvm.org/D6961 llvm-svn: 237961
* [Object] Teach Object and llvm-objdump about ".hidden"Davide Italiano2015-04-301-2/+6
| | | | | | | Differential Revision: http://reviews.llvm.org/D9416 Reviewed by: rafael llvm-svn: 236279
* For llvm-objdump, with the -archive-headers and -macho options, use the ↵Kevin Enderby2015-04-301-4/+10
| | | | | | | | | | -non-verbose option to print the archive headers using raw numeric values. Also add the -archive-member-offsets for use with these to also trigger printing of the offset of the archive member from the start of the archive. llvm-svn: 236252
* Move DIContext.h to common DebugInfo location.Zachary Turner2015-04-231-2/+3
| | | | | | | | | | This will enable us to create a PDBContext so as to expose some amount of debug info functionality through a common interace. Differential Revision: http://reviews.llvm.org/D9205 Reviewed by: Alexey Samsonov llvm-svn: 235612
* For llvm-objdump, dump the (__OBJC,__protocol) section for Objc1 32-bit ↵Kevin Enderby2015-04-161-0/+52
| | | | | | | | Mach-O files with the -section option as objc_protocol_t structs. llvm-svn: 235141
* [NFC] [MachO] remove extra semicolonsJingyue Wu2015-04-161-4/+4
| | | | llvm-svn: 235130
* For llvm-objdump added support for printing Objc1 32-bit runtime meta dataKevin Enderby2015-04-161-11/+836
| | | | | | with the existing -objc-meta-data and -macho options for Mach-O files. llvm-svn: 235119
* Fix failure on builder clang-cmake-mips where it was printing a 32-bit addressKevin Enderby2015-04-061-1/+2
| | | | | | | incorrectly because it came from an expression using S.getAddress() which always returns a 64-bit value. llvm-svn: 234251
* For llvm-objdump added support for printing Objc2 32-bit runtime meta dataKevin Enderby2015-04-061-20/+887
| | | | | | with the existing -objc-meta-data and -macho options for Mach-O files. llvm-svn: 234185
* Fix sanitizer-x86_64-linux-fast failure that was not deleting the bindtable.Kevin Enderby2015-04-011-0/+3
| | | | llvm-svn: 233856
* Add the option -objc-meta-data to llvm-objdump used with -macho toKevin Enderby2015-04-013-12/+1230
| | | | | | | | | | print the Objective-C runtime meta data for Mach-O files. There are three types of Objective-C runtime meta data, Objc2 64-bit, Objc2 32-bit and Objc1 32-bit. This prints the first of these types. The changes to print the others will follow next. llvm-svn: 233840
* Replace the MCSubtargetInfo parameter with a Triple when creatingEric Christopher2015-03-312-4/+4
| | | | | | | an MCInstPrinter. Update all callers and use where we wanted a Triple previously. llvm-svn: 233648
* [Objdump] Pass the correct subtarget to printInst.Akira Hatanaka2015-03-281-2/+2
| | | | | | This fixes a bug I introduced in r233411. llvm-svn: 233484
* [MCInstPrinter] Enable MCInstPrinter to change its behavior based on theAkira Hatanaka2015-03-272-4/+4
| | | | | | | | | | | | | | | | | | | | per-function subtarget. Currently, code-gen passes the default or generic subtarget to the constructors of MCInstPrinter subclasses (see LLVMTargetMachine::addPassesToEmitFile), which enables some targets (AArch64, ARM, and X86) to change their instprinter's behavior based on the subtarget feature bits. Since the backend can now use different subtargets for each function, instprinter has to be changed to use the per-function subtarget rather than the default subtarget. This patch takes the first step towards enabling instprinter to change its behavior based on the per-function subtarget. It adds a bit "PassSubtarget" to AsmWriter which tells table-gen to pass a reference to MCSubtargetInfo to the various print methods table-gen auto-generates. I will follow up with changes to instprinters of AArch64, ARM, and X86. llvm-svn: 233411
* Add a -raw option to the -section mode of llvm-objdump.Adrian Prantl2015-03-272-3/+14
| | | | llvm-svn: 233390
* Refactor: simplify boolean expressions in llvm-objdumpDavid Blaikie2015-03-231-235/+224
| | | | | | | | | | | | | | | | Simplify boolean expressions involving `true` and `false` with `clang-tidy`. Actually upon inspection a bunch of these boolean variables could be factored away entirely anyway - using find_if and then testing the result before using it. This also helps reduce indentation in the code anyway - and a bunch of other related simplification fell out nearby so I just committed all of that. Patch by Richard Thomson (legalize@xmission.com) Differential Revision: http://reviews.llvm.org/D8517 llvm-svn: 232984
* [Objdump] DumpBytes of uint8_t from ArrayRef<uint8_t> instead of char from ↵Colin LeMahieu2015-03-183-19/+13
| | | | | | StringRef. Removing reinterpret_casts. llvm-svn: 232659
* [Objdump] Removing size limit on DumpBytes and changing to range based for loop.Colin LeMahieu2015-03-181-20/+7
| | | | llvm-svn: 232654
* Add the option -no-symbolic-operands to llvm-objdump used with -macho andKevin Enderby2015-03-171-3/+7
| | | | | | -disassemble to not symbolic operands when disassembling. llvm-svn: 232558
* Add the option, -no-leading-addr llvm-objdump used with -macho andKevin Enderby2015-03-171-20/+28
| | | | | | -disassemble or -section to not print the leading addresses on each line. llvm-svn: 232547
* Add the option, -dis-symname to llvm-objdump used with -macho andKevin Enderby2015-03-172-0/+16
| | | | | | -disassemble to disassemble just one symbol’s instructions. llvm-svn: 232503
* Add the options, -dylibs-used and -dylib-id to llvm-objdump used with -machoKevin Enderby2015-03-163-1/+72
| | | | | | | to print the Mach-O dynamic shared libraries used by a linked image or the library id of a shared library. llvm-svn: 232406
* Add the option, -non-verbose to llvm-objdump used with -macho to print thingsKevin Enderby2015-03-132-16/+24
| | | | | | | | | | 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, -info-plist to llvm-objdump used with -macho to print theKevin Enderby2015-03-113-0/+31
| | | | | | Mach-O info plist section as strings. llvm-svn: 231974
* Make helper functions static.Benjamin Kramer2015-03-091-22/+25
| | | | | | Found by -Wmissing-prototypes. NFC. llvm-svn: 231664
* Add code to llvm-objdump so the -section option with -macho will dump ↵Kevin Enderby2015-02-171-18/+196
| | | | | | | | | | | literal pointer sections with the Mach-O S_LITERAL_POINTERS section type. Also fix the printing of the leading addresses for literal sections to be consistent and not print the 0x prefix. Updated test cases to match. llvm-svn: 229548
* Add code to llvm-objdump so the -section option with -macho will dump literalKevin Enderby2015-02-061-6/+134
| | | | | | sections with the Mach-O S_{4,8,16}BYTE_LITERALS section types. llvm-svn: 228465
* Identical code for different branches (CID 1254883)Sylvestre Ledru2015-02-051-27/+11
| | | | | | | | | | | | Reviewers: kledzik, rafael Reviewed By: rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6303 llvm-svn: 228313
* revert 228308. The code has changed since the reviewSylvestre Ledru2015-02-051-11/+26
| | | | llvm-svn: 228309
* Identical code for different branches (CID 1254883)Sylvestre Ledru2015-02-051-26/+11
| | | | | | | | | | | | Reviewers: kledzik, rafael Reviewed By: rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6303 llvm-svn: 228308
* Add code to llvm-objdump so the -section option with -macho will dump ↵Kevin Enderby2015-02-041-0/+22
| | | | | | | | ‘C’ string sections with the Mach-O S_CSTRING_LITERALS section type. llvm-svn: 228198
* Add code to llvm-objdump so the -section option with -macho will disassemble ↵Kevin Enderby2015-02-041-24/+23
| | | | | | | | sections that have attributes indicating they contain instructions. llvm-svn: 228101
* Add the -section option to llvm-objdump used with -macho that takes the argumentKevin Enderby2015-01-313-25/+203
| | | | | | | | | | segname,sectname to specify a Mach-O section to print. The printing is based on the section type or section attributes. The printing of the module initialization and termination section types is printed with this change. Printing of other section types will be added next. llvm-svn: 227649
* Move DebugInfo to DebugInfo/DWARF.Zachary Turner2015-01-304-4/+4
| | | | | | | | | | | | | In preparation for adding PDB support to LLVM, this moves the DWARF parsing code to its own subdirectory under DebugInfo, and renames LLVMDebugInfo to LLVMDebugInfoDWARF. This is purely a mechanical / build system change. Differential Revision: http://reviews.llvm.org/D7269 Reviewed by: Eric Christopher llvm-svn: 227586
* dd the option, -link-opt-hints to llvm-objdump used with -macho to print theKevin Enderby2015-01-273-2/+69
| | | | | | Mach-O AArch64 linker optimization hints for ADRP code optimization. llvm-svn: 227246
* Fix the problem with llvm-objdump and -archive-headers in printing the ↵Kevin Enderby2015-01-231-1/+1
| | | | | | | | archive header size field. This problem showed up with the clang-cmake-armv7-a15-full bot. Thanks to Renato Golin for his help. llvm-svn: 226936
* [Objdump] Output information about common symbols in a way closer to GNU ↵Colin LeMahieu2015-01-231-1/+11
| | | | | | objdump. llvm-svn: 226932
OpenPOWER on IntegriCloud