From f6d258537ddbe3dbbd59e7333d31b15bcdd87a20 Mon Sep 17 00:00:00 2001 From: Kevin Enderby Date: Sat, 31 Jan 2015 00:37:11 +0000 Subject: 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 --- .../llvm-objdump/X86/Inputs/dylibModInit.macho-x86_64 | Bin 0 -> 8256 bytes llvm/test/tools/llvm-objdump/X86/macho-section.test | 4 ++++ 2 files changed, 4 insertions(+) create mode 100755 llvm/test/tools/llvm-objdump/X86/Inputs/dylibModInit.macho-x86_64 create mode 100644 llvm/test/tools/llvm-objdump/X86/macho-section.test (limited to 'llvm/test/tools/llvm-objdump') 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 Binary files /dev/null and b/llvm/test/tools/llvm-objdump/X86/Inputs/dylibModInit.macho-x86_64 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 -- cgit v1.2.3