summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objdump
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2018-03-20 20:29:52 +0000
committerKevin Enderby <enderby@apple.com>2018-03-20 20:29:52 +0000
commit85b7a66eee81b0b2ff42aa6aeac14eb7bdac0b24 (patch)
treef20b9b69a15b64e4470f169f7b0e8cace2d53a45 /llvm/test/tools/llvm-objdump
parent3c9be62d24bf8de495dc6c707c8dbd3cedc86eef (diff)
downloadbcm5719-llvm-85b7a66eee81b0b2ff42aa6aeac14eb7bdac0b24.tar.gz
bcm5719-llvm-85b7a66eee81b0b2ff42aa6aeac14eb7bdac0b24.zip
For llvm-objdump and Mach-O files, fix the printing of module init and
term sections from .o files to look to see if the pointers have a relocation entry and if so print the symbol name from the relocation entry. If not fall back to the existing code and use the pointer value to look up that value in the symbol table. rdar://38337506 llvm-svn: 328037
Diffstat (limited to 'llvm/test/tools/llvm-objdump')
-rw-r--r--llvm/test/tools/llvm-objdump/X86/Inputs/objModInit.macho-x86_64bin0 -> 828 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/objModInit.macho-x86_64 b/llvm/test/tools/llvm-objdump/X86/Inputs/objModInit.macho-x86_64
new file mode 100644
index 00000000000..52dd9ca1011
--- /dev/null
+++ b/llvm/test/tools/llvm-objdump/X86/Inputs/objModInit.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
index e4d7857f141..a8eaa49d88d 100644
--- a/llvm/test/tools/llvm-objdump/X86/macho-section.test
+++ b/llvm/test/tools/llvm-objdump/X86/macho-section.test
@@ -1,8 +1,12 @@
// RUN: llvm-objdump -m -section __DATA,__mod_init_func %p/Inputs/dylibModInit.macho-x86_64 | FileCheck %s -check-prefix=MODINIT
// RUN: llvm-objdump -m -section __DATA,__mod_init_func -non-verbose %p/Inputs/dylibModInit.macho-x86_64 | FileCheck %s -check-prefix=NON_VERBOSE
+// RUN: llvm-objdump -m -section __DATA,__mod_init_func %p/Inputs/objModInit.macho-x86_64 | FileCheck %s -check-prefix=OBJ_MODINIT
MODINIT: Contents of (__DATA,__mod_init_func) section
MODINIT: 0x0000000000001000 0x0000000000000f30 _libinit
NON_VERBOSE: Contents of (__DATA,__mod_init_func) section
NON_VERBOSE: 0000000000001000 30 0f 00 00 00 00 00 00
+
+OBJ_MODINIT: Contents of (__DATA,__mod_init_func) section
+OBJ_MODINIT: 0x0000000000000018 0x0000000000000000 _constructor_func
OpenPOWER on IntegriCloud