Kevin Enderby
b55ba922b2
Add the option, -non-verbose to llvm-objdump used with -macho to print things
...
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
2015-03-13 17:56:32 +00:00
Kevin Enderby
2f4fa94335
Add the option, -info-plist to llvm-objdump used with -macho to print the
...
Mach-O info plist section as strings.
llvm-svn: 231974
2015-03-11 22:06:32 +00:00
Benjamin Kramer
5ce1e9672a
Make helper functions static.
...
Found by -Wmissing-prototypes. NFC.
llvm-svn: 231664
2015-03-09 16:23:46 +00:00
Kevin Enderby
5109879fd6
Add code to llvm-objdump so the -section option with -macho will dump 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
2015-02-17 21:35:48 +00:00
Kevin Enderby
03d099fa2a
Add code to llvm-objdump so the -section option with -macho will dump literal
...
sections with the Mach-O S_{4,8,16}BYTE_LITERALS section types.
llvm-svn: 228465
2015-02-06 23:25:38 +00:00
Sylvestre Ledru
5994acfe3d
Identical code for different branches (CID 1254883)
...
Reviewers: kledzik, rafael
Reviewed By: rafael
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6303
llvm-svn: 228313
2015-02-05 17:00:23 +00:00
Sylvestre Ledru
fd56919591
revert 228308. The code has changed since the review
...
llvm-svn: 228309
2015-02-05 16:35:44 +00:00
Sylvestre Ledru
65f25aa53a
Identical code for different branches (CID 1254883)
...
Reviewers: kledzik, rafael
Reviewed By: rafael
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6303
llvm-svn: 228308
2015-02-05 16:30:25 +00:00
Kevin Enderby
2f4b753a1a
Add code to llvm-objdump so the -section option with -macho will dump ‘C’ string
...
sections with the Mach-O S_CSTRING_LITERALS section type.
llvm-svn: 228198
2015-02-04 21:38:42 +00:00
Kevin Enderby
baa1461a00
Add code to llvm-objdump so the -section option with -macho will disassemble sections
...
that have attributes indicating they contain instructions.
llvm-svn: 228101
2015-02-04 01:01:38 +00:00
Kevin Enderby
1e55a979f8
Add the -section option to llvm-objdump used with -macho that takes the argument
...
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
2015-01-31 00:37:11 +00:00
Zachary Turner
9a7f59f9ea
Move DebugInfo to DebugInfo/DWARF.
...
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
2015-01-30 18:07:45 +00:00
Kevin Enderby
86e8129f3c
dd the option, -link-opt-hints to llvm-objdump used with -macho to print the
...
Mach-O AArch64 linker optimization hints for ADRP code optimization.
llvm-svn: 227246
2015-01-27 21:28:24 +00:00
Kevin Enderby
b1fbacd6a0
Fix the problem with llvm-objdump and -archive-headers in printing the 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
2015-01-23 21:02:44 +00:00
Colin LeMahieu
956de337d8
[Objdump] Output information about common symbols in a way closer to GNU objdump.
...
llvm-svn: 226932
2015-01-23 20:06:24 +00:00
Kevin Enderby
5bd811e58f
Add the option, -data-in-code, to llvm-objdump used with -macho to print the Mach-O data in code table.
...
llvm-svn: 226921
2015-01-23 18:52:17 +00:00
Kevin Enderby
e13fcc2ba4
Add the option, -indirect-symbols, used with -macho to print the Mach-O indirect symbol table to llvm-objdump.
...
llvm-svn: 226848
2015-01-22 18:55:27 +00:00
Kevin Enderby
83c3448a11
For llvm-objdump, hook up existing options to work when using -macho (the Mach-O parser).
...
llvm-svn: 226612
2015-01-20 21:47:46 +00:00
David Blaikie
4a6a34ad21
unique_ptrify the RelInfo parameter to TargetRegistry::createMCSymbolizer
...
llvm-svn: 226416
2015-01-18 20:45:48 +00:00
Kevin Enderby
2473644cb2
Fix the Archive::Child::getRawSize() method used by llvm-objdump’s -archive-headers option
...
and tweak its use in llvm-objdump. Add back the test case for the -archive-headers option.
llvm-svn: 226332
2015-01-16 22:10:36 +00:00
Kevin Enderby
c8e3a999b3
Add the option, -archive-headers, used with -macho to print the Mach-O archive headers to llvm-objdump.
...
llvm-svn: 226228
2015-01-15 23:19:11 +00:00
Chandler Carruth
0b619fcc8e
[cleanup] Re-sort all the #include lines in LLVM using
...
utils/sort_includes.py.
I clearly haven't done this in a while, so more changed than usual. This
even uncovered a missing include from the InstrProf library that I've
added. No functionality changed here, just mechanical cleanup of the
include order.
llvm-svn: 225974
2015-01-14 11:23:27 +00:00
Kevin Enderby
afb7885642
Fix an ASAN failure introduced with r225537 (adding the -universal-headers to llvm-obdump).
...
And a fly by fix to some formatting issues with the same commit.
llvm-svn: 225550
2015-01-09 21:55:03 +00:00
Kevin Enderby
901dddff2f
Add the option, -universal-headers, used with -macho to print the Mach-O universal headers to llvm-objdump.
...
llvm-svn: 225537
2015-01-09 19:22:37 +00:00
Kevin Enderby
82a2b4ceec
Run clang-format on tools/llvm-objdump/MachODump.cpp again as some of my
...
previous changes got in with incorrect formatting. No functional change.
llvm-svn: 225417
2015-01-08 00:25:24 +00:00
Kevin Enderby
ab9fa91a6e
Slightly refactor things for llvm-objdump and the -macho option so it can be used with
...
options other than just -disassemble so that universal files can be used with other
options combined with -arch options.
No functional change to existing options and use. One test case added for the
additional functionality with a universal file an a -arch option.
llvm-svn: 225383
2015-01-07 21:02:18 +00:00
Filipe Cabecinhas
5c29b60bc5
Don't loop endlessly for MachO files with 0 ncmds
...
llvm-svn: 225271
2015-01-06 17:08:26 +00:00
Kevin Enderby
80b4a3c2ca
Another attempt to fix the LLVM Windows build bot lld-x86_64-win7, one last place to fix I think.
...
llvm-svn: 224794
2014-12-24 00:16:51 +00:00
Kevin Enderby
7152971b3b
Attempt to fix the LLVM Windows build bot lld-x86_64-win7.
...
llvm-svn: 224793
2014-12-23 23:43:59 +00:00
Kevin Enderby
3c109420ec
Add printing the LC_THREAD load commands with llvm-objdump’s -private-headers.
...
llvm-svn: 224792
2014-12-23 22:56:39 +00:00
David Majnemer
45ac06f549
strnlen isn't available on some platforms, use StringRef instead
...
llvm-svn: 224679
2014-12-20 08:24:43 +00:00
Kevin Enderby
7664feebc5
Add printing the LC_ROUTINES load commands with llvm-objdump’s -private-headers.
...
llvm-svn: 224627
2014-12-19 22:25:22 +00:00
Kevin Enderby
213e0f76f1
Add printing the LC_SUB_CLIENT load command with llvm-objdump’s -private-headers.
...
llvm-svn: 224616
2014-12-19 21:06:24 +00:00
Kevin Enderby
eb0052136f
Add printing the LC_SUB_LIBRARY load command with llvm-objdump’s -private-headers.
...
llvm-svn: 224607
2014-12-19 19:48:16 +00:00
Kevin Enderby
61ee8e90b3
Add printing the LC_SUB_UMBRELLA load command with llvm-objdump’s -private-headers.
...
llvm-svn: 224548
2014-12-18 23:13:26 +00:00
Kevin Enderby
5c57c31db7
Add printing the LC_SUB_FRAMEWORK load command with llvm-objdump’s -private-headers.
...
llvm-svn: 224534
2014-12-18 19:24:35 +00:00
Kevin Enderby
7c66bebcdf
Add printing the LC_LINKER_OPTION load command with llvm-objdump’s -private-headers.
...
Also corrected the name of the load command to not end in an ’S’ as well as corrected
the name of the MachO::linker_option_command struct and other places that had the
word option as plural which did not match the Mac OS X headers.
llvm-svn: 224485
2014-12-18 00:53:40 +00:00
Rafael Espindola
5193b71e57
Remove unused includes and out of date comment. NFC.
...
llvm-svn: 224413
2014-12-17 03:07:20 +00:00
Kevin Enderby
dc6f805541
Add printing the LC_ENCRYPTION_INFO_64 load command with llvm-objdump’s -private-headers
...
and add tests for the two AArch64 binaries.
llvm-svn: 224400
2014-12-17 01:01:30 +00:00
Kevin Enderby
c4d55fc277
Add printing the LC_ENCRYPTION_INFO load command with llvm-objdump’s -private-headers.
...
llvm-svn: 224390
2014-12-16 23:25:52 +00:00
Kevin Enderby
601ffaa6fb
Fix a bug in llvm-objdump’s -private-headers for the LC_VERSION_MIN_IPHONEOS
...
load command not getting printed.
llvm-svn: 224376
2014-12-16 21:48:27 +00:00
Kevin Enderby
1fc8b820e6
Fix another use of PRIx32 that should have been PRIx64.
...
llvm-svn: 224368
2014-12-16 21:00:25 +00:00
Kevin Enderby
42ed7ac478
Fix the arm build bots for a test that was added. A printing routine was incorrectly using PRIx32
...
when it should have been using PRIx64 for the value that was passed as uint64_t .
llvm-svn: 224350
2014-12-16 18:58:11 +00:00
Kevin Enderby
db5408dea6
Fix a bug in llvm-objdump’s -private-headers for 32-bit Mach-O files
...
printing the section header. And add some tests for this for 32-bit files.
llvm-svn: 224302
2014-12-16 01:14:45 +00:00
Rafael Espindola
2b82749cbe
Return ErrorOr<std::unique_ptr<Archive>> form getAsArchive.
...
This is the same return type of Archive::create.
llvm-svn: 223827
2014-12-09 21:05:36 +00:00
Kevin Enderby
291f346eff
Re-add support to llvm-objdump for Mach-O universal files and archives with -macho
...
with fixes. Includes the move of tests for llvm-objdump for universal files to an X86
directory. And the fix where it was failing on linux Rafael tracked down with asan.
I had both Jim Grosbach and Adam Hemet look over the second fix since I could not
set up asan to reproduce with the old version but not with the fix.
llvm-svn: 223416
2014-12-04 23:56:27 +00:00
Jean-Daniel Dupas
d567300387
Add mach-o LC_RPATH support to llvm-objdump
...
Summary: Add rpath load command support in Mach-O object and update llvm-objdump to use it.
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6512
llvm-svn: 223343
2014-12-04 07:37:02 +00:00
Rafael Espindola
4f7ba285db
This reverts commit r223306 and r223277.
...
The code is using uninitialized memory and failing on linux.
llvm-svn: 223315
2014-12-03 23:29:34 +00:00
Kevin Enderby
b19e536332
Add support to llvm-objdump for Mach-O universal files and archives with -macho.
...
llvm-svn: 223277
2014-12-03 22:29:40 +00:00
Rui Ueyama
ab9d8be85c
Object/COFF: Fix off-by-one error for object having lots of relocations
...
llvm-objdump printed out an error message for this off-by-one error,
but because it always exits with 0 whether or not it found an error,
the test (llvm-objdump/coff-many-relocs.test) succeeded.
I made llvm-objdump exit with EXIT_FAILURE when an error is found.
llvm-svn: 222852
2014-11-26 22:17:25 +00:00