From 85b7a66eee81b0b2ff42aa6aeac14eb7bdac0b24 Mon Sep 17 00:00:00 2001 From: Kevin Enderby Date: Tue, 20 Mar 2018 20:29:52 +0000 Subject: 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 --- llvm/test/tools/llvm-objdump/X86/macho-section.test | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/test/tools/llvm-objdump/X86/macho-section.test') 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 -- cgit v1.2.3