From a1703b1fc206f2050de9160f9bc1f85a1aa000dc Mon Sep 17 00:00:00 2001 From: Michael Trent Date: Fri, 15 Dec 2017 17:57:40 +0000 Subject: Updated llvm-objdump to display local relocations in Mach-O binaries Summary: llvm-objdump's Mach-O parser was updated in r306037 to display external relocations for MH_KEXT_BUNDLE file types. This change extends the Macho-O parser to display local relocations for MH_PRELOAD files. When used with the -macho option relocations will be displayed in a historical format. All tests are passing for llvm, clang, and lld. llvm-objdump builds without compiler warnings. rdar://35778019 Reviewers: enderby Reviewed By: enderby Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41199 llvm-svn: 320832 --- llvm/test/tools/llvm-objdump/X86/macho-relocations.test | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'llvm/test/tools/llvm-objdump/X86/macho-relocations.test') diff --git a/llvm/test/tools/llvm-objdump/X86/macho-relocations.test b/llvm/test/tools/llvm-objdump/X86/macho-relocations.test index 536aec8b1bc..111cf0cc95b 100644 --- a/llvm/test/tools/llvm-objdump/X86/macho-relocations.test +++ b/llvm/test/tools/llvm-objdump/X86/macho-relocations.test @@ -1,7 +1,9 @@ RUN: llvm-objdump -macho -r %p/Inputs/hello.obj.macho-x86_64 | FileCheck %s -CHECK: RELOCATION RECORDS FOR [__text]: -CHECK: 0000000000000027 X86_64_RELOC_BRANCH _printf -CHECK: 000000000000000b X86_64_RELOC_SIGNED L_.str -CHECK: RELOCATION RECORDS FOR [__compact_unwind]: -CHECK: 0000000000000000 X86_64_RELOC_UNSIGNED __text +CHECK: Relocation information (__TEXT,__text) 2 entries +CHECK: address pcrel length extern type scattered symbolnum/value +CHECK: 00000027 True long True BRANCH False _printf +CHECK: 0000000b True long True SIGNED False L_.str +CHECK: Relocation information (__LD,__compact_unwind) 1 entries +CHECK: address pcrel length extern type scattered symbolnum/value +CHECK: 00000000 False quad False UNSIGND False 1 (__TEXT,__text) -- cgit v1.2.3