summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objdump
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2015-01-31 00:37:11 +0000
committerKevin Enderby <enderby@apple.com>2015-01-31 00:37:11 +0000
commitf6d258537ddbe3dbbd59e7333d31b15bcdd87a20 (patch)
treeb65c31d2d0b093ce3e10f196c92a5d960cc7b3e8 /llvm/test/tools/llvm-objdump
parent295596a0a7981a5ebb045b84dd99a6127d1ba402 (diff)
downloadbcm5719-llvm-f6d258537ddbe3dbbd59e7333d31b15bcdd87a20.tar.gz
bcm5719-llvm-f6d258537ddbe3dbbd59e7333d31b15bcdd87a20.zip
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
Diffstat (limited to 'llvm/test/tools/llvm-objdump')
-rwxr-xr-xllvm/test/tools/llvm-objdump/X86/Inputs/dylibModInit.macho-x86_64bin0 -> 8256 bytes
-rw-r--r--llvm/test/tools/llvm-objdump/X86/macho-section.test4
2 files changed, 4 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-objdump/X86/Inputs/dylibModInit.macho-x86_64 b/llvm/test/tools/llvm-objdump/X86/Inputs/dylibModInit.macho-x86_64
new file mode 100755
index 00000000000..a39424aab31
--- /dev/null
+++ b/llvm/test/tools/llvm-objdump/X86/Inputs/dylibModInit.macho-x86_64
Binary files differ
diff --git a/llvm/test/tools/llvm-objdump/X86/macho-section.test b/llvm/test/tools/llvm-objdump/X86/macho-section.test
new file mode 100644
index 00000000000..720b9a402e1
--- /dev/null
+++ b/llvm/test/tools/llvm-objdump/X86/macho-section.test
@@ -0,0 +1,4 @@
+// RUN: llvm-objdump -m -section __DATA,__mod_init_func %p/Inputs/dylibModInit.macho-x86_64 | FileCheck %s -check-prefix=MODINIT
+
+MODINIT: Contents of (__DATA,__mod_init_func) section
+MODINIT: 0x0000000000001000 0x0000000000000f30 _libinit
OpenPOWER on IntegriCloud