diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-13 01:45:40 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-13 01:45:40 +0000 |
commit | da2a2372c6ae715befae7f086afe769dd80814f3 (patch) | |
tree | b9e1c0966e7c73d6ee1bee63a61bab5ceeee4d4d /test/tools/llvm-readobj/relocations.test | |
parent | 3d60241c3e86973be281660bc5971c3a46cfdc47 (diff) | |
download | external_llvm-da2a2372c6ae715befae7f086afe769dd80814f3.zip external_llvm-da2a2372c6ae715befae7f086afe769dd80814f3.tar.gz external_llvm-da2a2372c6ae715befae7f086afe769dd80814f3.tar.bz2 |
Finish templating MachObjectFile over endianness.
We are now able to handle big endian macho files in llvm-readobject. Thanks to
David Fang for providing the object files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179440 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/tools/llvm-readobj/relocations.test')
-rw-r--r-- | test/tools/llvm-readobj/relocations.test | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/test/tools/llvm-readobj/relocations.test b/test/tools/llvm-readobj/relocations.test index 96aac23..6dc08ee 100644 --- a/test/tools/llvm-readobj/relocations.test +++ b/test/tools/llvm-readobj/relocations.test @@ -6,6 +6,10 @@ RUN: llvm-readobj -r %p/Inputs/trivial.obj.macho-i386 \ RUN: | FileCheck %s -check-prefix MACHO-I386 RUN: llvm-readobj -r %p/Inputs/trivial.obj.macho-x86-64 \ RUN: | FileCheck %s -check-prefix MACHO-X86-64 +RUN: llvm-readobj -r %p/Inputs/trivial.obj.macho-ppc \ +RUN: | FileCheck %s -check-prefix MACHO-PPC +RUN: llvm-readobj -r %p/Inputs/trivial.obj.macho-ppc64 \ +RUN: | FileCheck %s -check-prefix MACHO-PPC64 COFF: Relocations [ COFF-NEXT: Section (1) .text { @@ -40,3 +44,41 @@ MACHO-X86-64-NEXT: 0x9 1 2 1 X86_64_RELOC_BRANCH 0 _puts MACHO-X86-64-NEXT: 0x4 1 2 1 X86_64_RELOC_SIGNED 0 L_.str MACHO-X86-64-NEXT: } MACHO-X86-64-NEXT:] + +MACHO-PPC: Relocations [ +MACHO-PPC-NEXT: Section __text { +MACHO-PPC-NEXT: 0x24 0 2 n/a PPC_RELOC_LO16_SECTDIFF 1 _b +MACHO-PPC-NEXT: 0x0 0 2 n/a PPC_RELOC_PAIR 1 _b +MACHO-PPC-NEXT: 0x1C 0 2 n/a PPC_RELOC_HA16_SECTDIFF 1 _b +MACHO-PPC-NEXT: 0x58 0 2 n/a PPC_RELOC_PAIR 1 _b +MACHO-PPC-NEXT: 0x18 1 2 0 PPC_RELOC_BR24 0 _b +MACHO-PPC-NEXT: } +MACHO-PPC-NEXT: Section __picsymbolstub1 { +MACHO-PPC-NEXT: 0x14 0 2 n/a PPC_RELOC_LO16_SECTDIFF 1 _b +MACHO-PPC-NEXT: 0x0 0 2 n/a PPC_RELOC_PAIR 1 _b +MACHO-PPC-NEXT: 0xC 0 2 n/a PPC_RELOC_HA16_SECTDIFF 1 _b +MACHO-PPC-NEXT: 0x20 0 2 n/a PPC_RELOC_PAIR 1 _b +MACHO-PPC-NEXT: } +MACHO-PPC-NEXT: Section __la_symbol_ptr { +MACHO-PPC-NEXT: 0x0 0 2 1 PPC_RELOC_VANILLA 0 dyld_stub_binding_helper +MACHO-PPC-NEXT: } +MACHO-PPC-NEXT: ] + +MACHO-PPC64: Relocations [ +MACHO-PPC64-NEXT: Section __text { +MACHO-PPC64-NEXT: 0x24 0 2 n/a 1 _b +MACHO-PPC64-NEXT: 0x0 0 2 n/a 1 _b +MACHO-PPC64-NEXT: 0x1C 0 2 n/a 1 _b +MACHO-PPC64-NEXT: 0x58 0 2 n/a 1 _b +MACHO-PPC64-NEXT: 0x18 1 2 0 0 _b +MACHO-PPC64-NEXT: } +MACHO-PPC64-NEXT: Section __picsymbolstub1 { +MACHO-PPC64-NEXT: 0x14 0 2 n/a 1 _b +MACHO-PPC64-NEXT: 0x0 0 2 n/a 1 _b +MACHO-PPC64-NEXT: 0xC 0 2 n/a 1 _b +MACHO-PPC64-NEXT: 0x24 0 2 n/a 1 _b +MACHO-PPC64-NEXT: } +MACHO-PPC64-NEXT: Section __la_symbol_ptr { +MACHO-PPC64-NEXT: 0x0 0 3 1 0 dyld_stub_binding_helper +MACHO-PPC64-NEXT: } +MACHO-PPC64-NEXT: ] |