diff options
Diffstat (limited to 'test/MC/MachO')
-rw-r--r-- | test/MC/MachO/AArch64/cfstring.s | 24 | ||||
-rw-r--r-- | test/MC/MachO/AArch64/classrefs.s | 25 | ||||
-rw-r--r-- | test/MC/MachO/AArch64/darwin-ARM64-reloc.s | 355 | ||||
-rw-r--r-- | test/MC/MachO/AArch64/mergeable.s | 59 | ||||
-rw-r--r-- | test/MC/MachO/AArch64/reloc-crash.s | 27 | ||||
-rw-r--r-- | test/MC/MachO/AArch64/reloc-crash2.s | 24 | ||||
-rw-r--r-- | test/MC/MachO/ARM/static-movt-relocs.s | 57 | ||||
-rw-r--r-- | test/MC/MachO/darwin-x86_64-reloc.s | 679 | ||||
-rw-r--r-- | test/MC/MachO/linker-options.ll | 6 | ||||
-rw-r--r-- | test/MC/MachO/reloc.s | 400 | ||||
-rw-r--r-- | test/MC/MachO/x86_64-mergeable.s | 59 | ||||
-rw-r--r-- | test/MC/MachO/x86_64-symbols.s | 1246 |
12 files changed, 1381 insertions, 1580 deletions
diff --git a/test/MC/MachO/AArch64/cfstring.s b/test/MC/MachO/AArch64/cfstring.s new file mode 100644 index 0000000..19b5067 --- /dev/null +++ b/test/MC/MachO/AArch64/cfstring.s @@ -0,0 +1,24 @@ +; RUN: llvm-mc -triple arm64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -r --expand-relocs | FileCheck %s + +; Test that we produce an external relocation. There is no apparent need for it, but +; ld64 (241.9) produces a corrupt output if we don't. + +// CHECK: Relocations [ +// CHECK-NEXT: Section __data { +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x0 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: Lfoo +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: ] + + .section __DATA,__cfstring +Lfoo: + + .section __DATA,__data + .quad Lfoo diff --git a/test/MC/MachO/AArch64/classrefs.s b/test/MC/MachO/AArch64/classrefs.s new file mode 100644 index 0000000..5edc82c --- /dev/null +++ b/test/MC/MachO/AArch64/classrefs.s @@ -0,0 +1,25 @@ +; RUN: llvm-mc -triple arm64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -r --expand-relocs | FileCheck %s + +; Test that we produce an external relocation with Lbar. We could also produce +; an internal relocation. We just have to be careful to not use another symbol. + +// CHECK: Relocations [ +// CHECK-NEXT: Section __data { +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x0 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: Lbar +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: ] + + .section __DATA,__objc_classrefs,regular,no_dead_strip +Lbar: + + .section __DATA,__data + .quad Lbar + diff --git a/test/MC/MachO/AArch64/darwin-ARM64-reloc.s b/test/MC/MachO/AArch64/darwin-ARM64-reloc.s index 7f586ae..07d5252 100644 --- a/test/MC/MachO/AArch64/darwin-ARM64-reloc.s +++ b/test/MC/MachO/AArch64/darwin-ARM64-reloc.s @@ -1,4 +1,4 @@ -; RUN: llvm-mc -n -triple arm64-apple-darwin10 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s +; RUN: llvm-mc -n -triple arm64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -r --expand-relocs | FileCheck %s .text _fred: @@ -15,6 +15,7 @@ _fred: adrp x3, _data_ext@gotpage ldr w2, [x3, _data_ext@gotpageoff] + adrp x0, L_.str@PAGE .data _data: @@ -28,130 +29,230 @@ _data: .quad _foo@got .long _foo@got - . + .section __TEXT,__cstring,cstring_literals +L_.str: + .asciz "foo" -; CHECK: ('cputype', 16777228) -; CHECK: ('cpusubtype', 0) -; CHECK: ('filetype', 1) -; CHECK: ('num_load_commands', 3) -; CHECK: ('load_commands_size', 336) -; CHECK: ('flag', 0) -; CHECK: ('reserved', 0) -; CHECK: ('load_commands', [ -; CHECK: # Load Command 0 -; CHECK: (('command', 25) -; CHECK: ('size', 232) -; CHECK: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -; CHECK: ('vm_addr', 0) -; CHECK: ('vm_size', 84) -; CHECK: ('file_offset', 368) -; CHECK: ('file_size', 84) -; CHECK: ('maxprot', 7) -; CHECK: ('initprot', 7) -; CHECK: ('num_sections', 2) -; CHECK: ('flags', 0) -; CHECK: ('sections', [ -; CHECK: # Section 0 -; CHECK: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -; CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -; CHECK: ('address', 0) -; CHECK: ('size', 36) -; CHECK: ('offset', 368) -; CHECK: ('alignment', 0) -; CHECK: ('reloc_offset', 452) -; CHECK: ('num_reloc', 13) -; CHECK: ('flags', 0x80000400) -; CHECK: ('reserved1', 0) -; CHECK: ('reserved2', 0) -; CHECK: ('reserved3', 0) -; CHECK: ), -; CHECK: ('_relocations', [ -; CHECK: # Relocation 0 -; CHECK: (('word-0', 0x20), -; CHECK: ('word-1', 0x6c000005)), -; CHECK: # Relocation 1 -; CHECK: (('word-0', 0x1c), -; CHECK: ('word-1', 0x5d000005)), -; CHECK: # Relocation 2 -; CHECK: (('word-0', 0x18), -; CHECK: ('word-1', 0xa4000004)), -; CHECK: # Relocation 3 -; CHECK: (('word-0', 0x18), -; CHECK: ('word-1', 0x4c000002)), -; CHECK: # Relocation 4 -; CHECK: (('word-0', 0x14), -; CHECK: ('word-1', 0xa4000001)), -; CHECK: # Relocation 5 -; CHECK: (('word-0', 0x14), -; CHECK: ('word-1', 0x3d000002)), -; CHECK: # Relocation 6 -; CHECK: (('word-0', 0x10), -; CHECK: ('word-1', 0xa4000004)), -; CHECK: # Relocation 7 -; CHECK: (('word-0', 0x10), -; CHECK: ('word-1', 0x4c000002)), -; CHECK: # Relocation 8 -; CHECK: (('word-0', 0xc), -; CHECK: ('word-1', 0x4c000002)), -; CHECK: # Relocation 9 -; CHECK: (('word-0', 0x8), -; CHECK: ('word-1', 0x3d000002)), -; CHECK: # Relocation 10 -; CHECK: (('word-0', 0x4), -; CHECK: ('word-1', 0xa4000014)), -; CHECK: # Relocation 11 -; CHECK: (('word-0', 0x4), -; CHECK: ('word-1', 0x2d000007)), -; CHECK: # Relocation 12 -; CHECK: (('word-0', 0x0), -; CHECK: ('word-1', 0x2d000007)), -; CHECK: ]) -; CHECK: ('_section_data', '00000094 00000094 03000090 620040b9 63000091 03000090 620040b9 03000090 620040b9') -; CHECK: # Section 1 -; CHECK: (('section_name', '__data\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -; CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -; CHECK: ('address', 36) -; CHECK: ('size', 48) -; CHECK: ('offset', 404) -; CHECK: ('alignment', 0) -; CHECK: ('reloc_offset', 556) -; CHECK: ('num_reloc', 10) -; CHECK: ('flags', 0x0) -; CHECK: ('reserved1', 0) -; CHECK: ('reserved2', 0) -; CHECK: ('reserved3', 0) -; CHECK: ), -; CHECK: ('_relocations', [ -; CHECK: # Relocation 0 -; CHECK: (('word-0', 0x2c), -; CHECK: ('word-1', 0x7d000006)), -; CHECK: # Relocation 1 -; CHECK: (('word-0', 0x24), -; CHECK: ('word-1', 0x7e000006)), -; CHECK: # Relocation 2 -; CHECK: (('word-0', 0x20), -; CHECK: ('word-1', 0x1c000004)), -; CHECK: # Relocation 3 -; CHECK: (('word-0', 0x20), -; CHECK: ('word-1', 0xc000006)), -; CHECK: # Relocation 4 -; CHECK: (('word-0', 0x18), -; CHECK: ('word-1', 0x1e000004)), -; CHECK: # Relocation 5 -; CHECK: (('word-0', 0x18), -; CHECK: ('word-1', 0xe000006)), -; CHECK: # Relocation 6 -; CHECK: (('word-0', 0x10), -; CHECK: ('word-1', 0x1e000004)), -; CHECK: # Relocation 7 -; CHECK: (('word-0', 0x10), -; CHECK: ('word-1', 0xe000006)), -; CHECK: # Relocation 8 -; CHECK: (('word-0', 0x8), -; CHECK: ('word-1', 0xe000006)), -; CHECK: # Relocation 9 -; CHECK: (('word-0', 0x0), -; CHECK: ('word-1', 0xe000006)), -; CHECK: ]) -; CHECK: ('_section_data', '00000000 00000000 04000000 00000000 00000000 00000000 04000000 00000000 00000000 00000000 00000000 d4ffffff') -; CHECK: ]) -; CHECK: ), + +; CHECK: Relocations [ +; CHECK-NEXT: Section __text { +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x24 +; CHECK-NEXT: PCRel: 1 +; CHECK-NEXT: Length: 2 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_PAGE21 (3) +; CHECK-NEXT: Symbol: L_.str +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x20 +; CHECK-NEXT: PCRel: 0 +; CHECK-NEXT: Length: 2 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_GOT_LOAD_PAGEOFF12 (6) +; CHECK-NEXT: Symbol: _data_ext +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x1C +; CHECK-NEXT: PCRel: 1 +; CHECK-NEXT: Length: 2 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_GOT_LOAD_PAGE21 (5) +; CHECK-NEXT: Symbol: _data_ext +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x18 +; CHECK-NEXT: PCRel: 0 +; CHECK-NEXT: Length: 2 +; CHECK-NEXT: Extern: 0 +; CHECK-NEXT: Type: ARM64_RELOC_ADDEND (10) +; CHECK-NEXT: Symbol: 0x4 +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x18 +; CHECK-NEXT: PCRel: 0 +; CHECK-NEXT: Length: 2 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_PAGEOFF12 (4) +; CHECK-NEXT: Symbol: _data +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x14 +; CHECK-NEXT: PCRel: 0 +; CHECK-NEXT: Length: 2 +; CHECK-NEXT: Extern: 0 +; CHECK-NEXT: Type: ARM64_RELOC_ADDEND (10) +; CHECK-NEXT: Symbol: 0x1 +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x14 +; CHECK-NEXT: PCRel: 1 +; CHECK-NEXT: Length: 2 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_PAGE21 (3) +; CHECK-NEXT: Symbol: _data +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x10 +; CHECK-NEXT: PCRel: 0 +; CHECK-NEXT: Length: 2 +; CHECK-NEXT: Extern: 0 +; CHECK-NEXT: Type: ARM64_RELOC_ADDEND (10) +; CHECK-NEXT: Symbol: 0x4 +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x10 +; CHECK-NEXT: PCRel: 0 +; CHECK-NEXT: Length: 2 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_PAGEOFF12 (4) +; CHECK-NEXT: Symbol: _data +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0xC +; CHECK-NEXT: PCRel: 0 +; CHECK-NEXT: Length: 2 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_PAGEOFF12 (4) +; CHECK-NEXT: Symbol: _data +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x8 +; CHECK-NEXT: PCRel: 1 +; CHECK-NEXT: Length: 2 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_PAGE21 (3) +; CHECK-NEXT: Symbol: _data +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x4 +; CHECK-NEXT: PCRel: 0 +; CHECK-NEXT: Length: 2 +; CHECK-NEXT: Extern: 0 +; CHECK-NEXT: Type: ARM64_RELOC_ADDEND (10) +; CHECK-NEXT: Symbol: 0x14 +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x4 +; CHECK-NEXT: PCRel: 1 +; CHECK-NEXT: Length: 2 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_BRANCH26 (2) +; CHECK-NEXT: Symbol: _func +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x0 +; CHECK-NEXT: PCRel: 1 +; CHECK-NEXT: Length: 2 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_BRANCH26 (2) +; CHECK-NEXT: Symbol: _func +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: } +; CHECK-NEXT: Section __data { +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x2C +; CHECK-NEXT: PCRel: 1 +; CHECK-NEXT: Length: 2 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_POINTER_TO_GOT (7) +; CHECK-NEXT: Symbol: _foo +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x24 +; CHECK-NEXT: PCRel: 0 +; CHECK-NEXT: Length: 3 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_POINTER_TO_GOT (7) +; CHECK-NEXT: Symbol: _foo +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x20 +; CHECK-NEXT: PCRel: 0 +; CHECK-NEXT: Length: 2 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_SUBTRACTOR (1) +; CHECK-NEXT: Symbol: _bar +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x20 +; CHECK-NEXT: PCRel: 0 +; CHECK-NEXT: Length: 2 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0) +; CHECK-NEXT: Symbol: _foo +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x18 +; CHECK-NEXT: PCRel: 0 +; CHECK-NEXT: Length: 3 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_SUBTRACTOR (1) +; CHECK-NEXT: Symbol: _bar +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x18 +; CHECK-NEXT: PCRel: 0 +; CHECK-NEXT: Length: 3 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0) +; CHECK-NEXT: Symbol: _foo +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x10 +; CHECK-NEXT: PCRel: 0 +; CHECK-NEXT: Length: 3 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_SUBTRACTOR (1) +; CHECK-NEXT: Symbol: _bar +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x10 +; CHECK-NEXT: PCRel: 0 +; CHECK-NEXT: Length: 3 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0) +; CHECK-NEXT: Symbol: _foo +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x8 +; CHECK-NEXT: PCRel: 0 +; CHECK-NEXT: Length: 3 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0) +; CHECK-NEXT: Symbol: _foo +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x0 +; CHECK-NEXT: PCRel: 0 +; CHECK-NEXT: Length: 3 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0) +; CHECK-NEXT: Symbol: _foo +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: } +; CHECK-NEXT: ] diff --git a/test/MC/MachO/AArch64/mergeable.s b/test/MC/MachO/AArch64/mergeable.s new file mode 100644 index 0000000..fc6ec04 --- /dev/null +++ b/test/MC/MachO/AArch64/mergeable.s @@ -0,0 +1,59 @@ +// RUN: llvm-mc -triple aarch64-apple-darwin14 %s -filetype=obj -o - | llvm-readobj -r --expand-relocs | FileCheck %s + +// Test that we "S + K" produce a relocation with a symbol, but just S produces +// a relocation with the section. + + .section __TEXT,__literal4,4byte_literals +L0: + .long 42 + + .section __TEXT,__cstring,cstring_literals +L1: + .asciz "42" + + .section __DATA,__data + .quad L0 + .quad L0 + 1 + .quad L1 + .quad L1 + 1 + +// CHECK: Relocations [ +// CHECK-NEXT: Section __data { +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x18 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: L1 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x10 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: L1 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x8 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: L0 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x0 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 0 +// CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: 0x2 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: ] diff --git a/test/MC/MachO/AArch64/reloc-crash.s b/test/MC/MachO/AArch64/reloc-crash.s new file mode 100644 index 0000000..4984947 --- /dev/null +++ b/test/MC/MachO/AArch64/reloc-crash.s @@ -0,0 +1,27 @@ +; RUN: llvm-mc -triple arm64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -r --expand-relocs | FileCheck %s + +; Test tha we produce an external relocation. There is no apparent need for it, but +; ld64 (241.9) crashes if we don't. + +; CHECK: Relocations [ +; CHECK-NEXT: Section __bar { +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x0 +; CHECK-NEXT: PCRel: 0 +; CHECK-NEXT: Length: 3 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_UNSIGNED (0) +; CHECK-NEXT: Symbol: Lbar +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: } +; CHECK-NEXT: ] + + .section __TEXT,__cstring +Lfoo: + .asciz "Hello World!" +Lbar: + .asciz "cString" + + .section __foo,__bar,literal_pointers + .quad Lbar diff --git a/test/MC/MachO/AArch64/reloc-crash2.s b/test/MC/MachO/AArch64/reloc-crash2.s new file mode 100644 index 0000000..6ae4471 --- /dev/null +++ b/test/MC/MachO/AArch64/reloc-crash2.s @@ -0,0 +1,24 @@ +; RUN: llvm-mc -triple arm64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -r --expand-relocs | FileCheck %s + +; This is a regression test making sure we don't crash. + +; CHECK: Relocations [ +; CHECK-NEXT: Section __text { +; CHECK-NEXT: Relocation { +; CHECK-NEXT: Offset: 0x0 +; CHECK-NEXT: PCRel: 0 +; CHECK-NEXT: Length: 2 +; CHECK-NEXT: Extern: 1 +; CHECK-NEXT: Type: ARM64_RELOC_PAGEOFF12 (4) +; CHECK-NEXT: Symbol: ltmp1 +; CHECK-NEXT: Scattered: 0 +; CHECK-NEXT: } +; CHECK-NEXT: } +; CHECK-NEXT: ] + + + ldr x0, [x8, L_bar@PAGEOFF] + + .section __foo,__bar,regular,no_dead_strip +L_bar: + .quad 0 diff --git a/test/MC/MachO/ARM/static-movt-relocs.s b/test/MC/MachO/ARM/static-movt-relocs.s index dce5683..4385549 100644 --- a/test/MC/MachO/ARM/static-movt-relocs.s +++ b/test/MC/MachO/ARM/static-movt-relocs.s @@ -1,4 +1,4 @@ -@ RUN: llvm-mc -mcpu=cortex-a8 -triple thumbv7-apple-darwin10 -filetype=obj -o - < %s | macho-dump | FileCheck %s +@ RUN: llvm-mc -mcpu=cortex-a8 -triple thumbv7-apple-darwin10 -filetype=obj -o - < %s | llvm-readobj -r --expand-relocs | FileCheck %s .thumb .thumb_func foo foo: @@ -6,18 +6,43 @@ foo: movt r0, :upper16:(bar + 16) bx r0 - -@ CHECK: ('_relocations', [ -@ CHECK: # Relocation 0 -@ CHECK: (('word-0', 0x4), -@ CHECK: ('word-1', 0x8e000001)), -@ CHECK: # Relocation 1 -@ CHECK: (('word-0', 0x10), -@ CHECK: ('word-1', 0x16ffffff)), -@ CHECK: # Relocation 2 -@ CHECK: (('word-0', 0x0), -@ CHECK: ('word-1', 0x8c000001)), -@ CHECK: # Relocation 3 -@ CHECK: (('word-0', 0x0), -@ CHECK: ('word-1', 0x14ffffff)), -@ CHECK: ]) +@ CHECK: Relocations [ +@ CHECK-NEXT: Section __text { +@ CHECK-NEXT: Relocation { +@ CHECK-NEXT: Offset: 0x4 +@ CHECK-NEXT: PCRel: 0 +@ CHECK-NEXT: Length: 3 +@ CHECK-NEXT: Extern: 1 +@ CHECK-NEXT: Type: ARM_RELOC_HALF (8) +@ CHECK-NEXT: Symbol: bar +@ CHECK-NEXT: Scattered: 0 +@ CHECK-NEXT: } +@ CHECK-NEXT: Relocation { +@ CHECK-NEXT: Offset: 0x10 +@ CHECK-NEXT: PCRel: 0 +@ CHECK-NEXT: Length: 3 +@ CHECK-NEXT: Extern: 0 +@ CHECK-NEXT: Type: ARM_RELOC_PAIR (1) +@ CHECK-NEXT: Symbol: 0xFFFFFF +@ CHECK-NEXT: Scattered: 0 +@ CHECK-NEXT: } +@ CHECK-NEXT: Relocation { +@ CHECK-NEXT: Offset: 0x0 +@ CHECK-NEXT: PCRel: 0 +@ CHECK-NEXT: Length: 2 +@ CHECK-NEXT: Extern: 1 +@ CHECK-NEXT: Type: ARM_RELOC_HALF (8) +@ CHECK-NEXT: Symbol: bar +@ CHECK-NEXT: Scattered: 0 +@ CHECK-NEXT: } +@ CHECK-NEXT: Relocation { +@ CHECK-NEXT: Offset: 0x0 +@ CHECK-NEXT: PCRel: 0 +@ CHECK-NEXT: Length: 2 +@ CHECK-NEXT: Extern: 0 +@ CHECK-NEXT: Type: ARM_RELOC_PAIR (1) +@ CHECK-NEXT: Symbol: 0xFFFFFF +@ CHECK-NEXT: Scattered: 0 +@ CHECK-NEXT: } +@ CHECK-NEXT: } +@ CHECK-NEXT: ] diff --git a/test/MC/MachO/darwin-x86_64-reloc.s b/test/MC/MachO/darwin-x86_64-reloc.s index 1dfb982..48dd6b4 100644 --- a/test/MC/MachO/darwin-x86_64-reloc.s +++ b/test/MC/MachO/darwin-x86_64-reloc.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -n -triple x86_64-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -n -triple x86_64-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -r --expand-relocs | FileCheck %s // These examples are taken from <mach-o/x86_64/reloc.h>. @@ -86,320 +86,363 @@ L6: .text cmpq $0, _foo@GOTPCREL(%rip) - -// CHECK: ('cputype', 16777223) -// CHECK: ('cpusubtype', 3) -// CHECK: ('filetype', 1) -// CHECK: ('num_load_commands', 3) -// CHECK: ('load_commands_size', 496) -// CHECK: ('flag', 0) -// CHECK: ('reserved', 0) -// CHECK: ('load_commands', [ -// CHECK: # Load Command 0 -// CHECK: (('command', 25) -// CHECK: ('size', 392) -// CHECK: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('vm_addr', 0) -// CHECK: ('vm_size', 311) -// CHECK: ('file_offset', 528) -// CHECK: ('file_size', 311) -// CHECK: ('maxprot', 7) -// CHECK: ('initprot', 7) -// CHECK: ('num_sections', 4) -// CHECK: ('flags', 0) -// CHECK: ('sections', [ -// CHECK: # Section 0 -// CHECK: (('section_name', '__data\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 40) -// CHECK: ('offset', 528) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 840) -// CHECK: ('num_reloc', 5) -// CHECK: ('flags', 0x0) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: # Relocation 0 -// CHECK: (('word-0', 0x20), -// CHECK: ('word-1', 0x6000004)), -// CHECK: # Relocation 1 -// CHECK: (('word-0', 0x18), -// CHECK: ('word-1', 0xe000006)), -// CHECK: # Relocation 2 -// CHECK: (('word-0', 0x10), -// CHECK: ('word-1', 0x6000004)), -// CHECK: # Relocation 3 -// CHECK: (('word-0', 0x8), -// CHECK: ('word-1', 0x4d000000)), -// CHECK: # Relocation 4 -// CHECK: (('word-0', 0x4), -// CHECK: ('word-1', 0x4d000008)), -// CHECK: ]) -// CHECK: ('_section_data', '00000000 04000000 04000000 00000000 1f010000 00000000 00000000 00000000 2f010000 00000000') -// CHECK: # Section 1 -// CHECK: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 40) -// CHECK: ('size', 223) -// CHECK: ('offset', 568) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 880) -// CHECK: ('num_reloc', 32) -// CHECK: ('flags', 0x80000400) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: # Relocation 0 -// CHECK: (('word-0', 0xda), -// CHECK: ('word-1', 0x4d000000)), -// CHECK: # Relocation 1 -// CHECK: (('word-0', 0xd3), -// CHECK: ('word-1', 0x15000004)), -// CHECK: # Relocation 2 -// CHECK: (('word-0', 0xcd), -// CHECK: ('word-1', 0x1d000006)), -// CHECK: # Relocation 3 -// CHECK: (('word-0', 0xc7), -// CHECK: ('word-1', 0x15000004)), -// CHECK: # Relocation 4 -// CHECK: (('word-0', 0xc1), -// CHECK: ('word-1', 0x15000001)), -// CHECK: # Relocation 5 -// CHECK: (('word-0', 0xa5), -// CHECK: ('word-1', 0x5e000003)), -// CHECK: # Relocation 6 -// CHECK: (('word-0', 0xa5), -// CHECK: ('word-1', 0xe000000)), -// CHECK: # Relocation 7 -// CHECK: (('word-0', 0x9d), -// CHECK: ('word-1', 0x5e000003)), -// CHECK: # Relocation 8 -// CHECK: (('word-0', 0x9d), -// CHECK: ('word-1', 0xe000000)), -// CHECK: # Relocation 9 -// CHECK: (('word-0', 0x95), -// CHECK: ('word-1', 0xe000003)), -// CHECK: # Relocation 10 -// CHECK: (('word-0', 0x8d), -// CHECK: ('word-1', 0xe000003)), -// CHECK: # Relocation 11 -// CHECK: (('word-0', 0x79), -// CHECK: ('word-1', 0x8d000003)), -// CHECK: # Relocation 12 -// CHECK: (('word-0', 0x71), -// CHECK: ('word-1', 0x7d000003)), -// CHECK: # Relocation 13 -// CHECK: (('word-0', 0x69), -// CHECK: ('word-1', 0x6d000003)), -// CHECK: # Relocation 14 -// CHECK: (('word-0', 0x63), -// CHECK: ('word-1', 0x1d000003)), -// CHECK: # Relocation 15 -// CHECK: (('word-0', 0x5c), -// CHECK: ('word-1', 0x1d000003)), -// CHECK: # Relocation 16 -// CHECK: (('word-0', 0x55), -// CHECK: ('word-1', 0x5c000002)), -// CHECK: # Relocation 17 -// CHECK: (('word-0', 0x55), -// CHECK: ('word-1', 0xc000000)), -// CHECK: # Relocation 18 -// CHECK: (('word-0', 0x4d), -// CHECK: ('word-1', 0x5e000002)), -// CHECK: # Relocation 19 -// CHECK: (('word-0', 0x4d), -// CHECK: ('word-1', 0xe000000)), -// CHECK: # Relocation 20 -// CHECK: (('word-0', 0x45), -// CHECK: ('word-1', 0x5e000002)), -// CHECK: # Relocation 21 -// CHECK: (('word-0', 0x45), -// CHECK: ('word-1', 0xe000000)), -// CHECK: # Relocation 22 -// CHECK: (('word-0', 0x3d), -// CHECK: ('word-1', 0xe000000)), -// CHECK: # Relocation 23 -// CHECK: (('word-0', 0x35), -// CHECK: ('word-1', 0xe000000)), -// CHECK: # Relocation 24 -// CHECK: (('word-0', 0x2d), -// CHECK: ('word-1', 0x8d000000)), -// CHECK: # Relocation 25 -// CHECK: (('word-0', 0x26), -// CHECK: ('word-1', 0x6d000000)), -// CHECK: # Relocation 26 -// CHECK: (('word-0', 0x20), -// CHECK: ('word-1', 0x1d000000)), -// CHECK: # Relocation 27 -// CHECK: (('word-0', 0x1a), -// CHECK: ('word-1', 0x1d000000)), -// CHECK: # Relocation 28 -// CHECK: (('word-0', 0x14), -// CHECK: ('word-1', 0x4d000000)), -// CHECK: # Relocation 29 -// CHECK: (('word-0', 0xe), -// CHECK: ('word-1', 0x3d000000)), -// CHECK: # Relocation 30 -// CHECK: (('word-0', 0x7), -// CHECK: ('word-1', 0x2d000000)), -// CHECK: # Relocation 31 -// CHECK: (('word-0', 0x2), -// CHECK: ('word-1', 0x2d000000)), -// CHECK: ]) -// CHECK: ('_section_data', 'c3e80000 0000e804 00000048 8b050000 0000ff35 00000000 8b050000 00008b05 04000000 c605ffff ffff12c7 05fcffff ff785634 12000000 00000000 00040000 00000000 00000000 00000000 00040000 00000000 00000000 00488d05 2c000000 488d0514 00000083 05130000 00066681 05120000 00f40181 05100000 00f40100 00909090 90909090 90909090 902c0000 00000000 00140000 00000000 00e4ffff ffffffff ffd4ffff ffffffff ff2c0000 00000000 0083c000 03042503 0000008b 051fffff ff8b052c 0000008b 05000000 008b0530 00000048 833dffff ffff00') -// CHECK: # Section 2 -// CHECK: (('section_name', '__debug_frame\x00\x00\x00') -// CHECK: ('segment_name', '__DWARF\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 263) -// CHECK: ('size', 16) -// CHECK: ('offset', 791) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 1136) -// CHECK: ('num_reloc', 2) -// CHECK: ('flags', 0x2000000) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: # Relocation 0 -// CHECK: (('word-0', 0x8), -// CHECK: ('word-1', 0xe000007)), -// CHECK: # Relocation 1 -// CHECK: (('word-0', 0x0), -// CHECK: ('word-1', 0x6000002)), -// CHECK: ]) -// CHECK: ('_section_data', 'd5000000 00000000 00000000 00000000') -// CHECK: # Section 3 -// CHECK: (('section_name', '__literal8\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 279) -// CHECK: ('size', 32) -// CHECK: ('offset', 807) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x4) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: ('_section_data', '00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000') -// CHECK: ]) -// CHECK: ), -// CHECK: # Load Command 1 -// CHECK: (('command', 2) -// CHECK: ('size', 24) -// CHECK: ('symoff', 1152) -// CHECK: ('nsyms', 9) -// CHECK: ('stroff', 1296) -// CHECK: ('strsize', 48) -// CHECK: ('_string_data', '\x00_baz\x00_prev\x00_foobar\x00_bar\x00_ext_foo\x00f6\x00_f3\x00_f2\x00\x00\x00\x00') -// CHECK: ('_symbols', [ -// CHECK: # Symbol 0 -// CHECK: (('n_strx', 29) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 2) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 40) -// CHECK: ('_string', '_foo') -// CHECK: ), -// CHECK: # Symbol 1 -// CHECK: (('n_strx', 1) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 2) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 41) -// CHECK: ('_string', '_baz') -// CHECK: ), -// CHECK: # Symbol 2 -// CHECK: (('n_strx', 20) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 2) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 101) -// CHECK: ('_string', '_bar') -// CHECK: ), -// CHECK: # Symbol 3 -// CHECK: (('n_strx', 6) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 2) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 169) -// CHECK: ('_string', '_prev') -// CHECK: ), -// CHECK: # Symbol 4 -// CHECK: (('n_strx', 41) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 2) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 221) -// CHECK: ('_string', '_f2') -// CHECK: ), -// CHECK: # Symbol 5 -// CHECK: (('n_strx', 37) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 2) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 224) -// CHECK: ('_string', '_f3') -// CHECK: ), -// CHECK: # Symbol 6 -// CHECK: (('n_strx', 34) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 4) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 295) -// CHECK: ('_string', 'f6') -// CHECK: ), -// CHECK: # Symbol 7 -// CHECK: (('n_strx', 25) -// CHECK: ('n_type', 0x1) -// CHECK: ('n_sect', 0) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', '_ext_foo') -// CHECK: ), -// CHECK: # Symbol 8 -// CHECK: (('n_strx', 12) -// CHECK: ('n_type', 0x1) -// CHECK: ('n_sect', 0) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', '_foobar') -// CHECK: ), -// CHECK: ]) -// CHECK: ), -// CHECK: # Load Command 2 -// CHECK: (('command', 11) -// CHECK: ('size', 80) -// CHECK: ('ilocalsym', 0) -// CHECK: ('nlocalsym', 7) -// CHECK: ('iextdefsym', 7) -// CHECK: ('nextdefsym', 0) -// CHECK: ('iundefsym', 7) -// CHECK: ('nundefsym', 2) -// CHECK: ('tocoff', 0) -// CHECK: ('ntoc', 0) -// CHECK: ('modtaboff', 0) -// CHECK: ('nmodtab', 0) -// CHECK: ('extrefsymoff', 0) -// CHECK: ('nextrefsyms', 0) -// CHECK: ('indirectsymoff', 0) -// CHECK: ('nindirectsyms', 0) -// CHECK: ('extreloff', 0) -// CHECK: ('nextrel', 0) -// CHECK: ('locreloff', 0) -// CHECK: ('nlocrel', 0) -// CHECK: ('_indirect_symbols', [ -// CHECK: ]) -// CHECK: ), -// CHECK: ]) + +// CHECK: Relocations [ +// CHECK-NEXT: Section __data { +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x20 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 0 +// CHECK-NEXT: Type: X86_64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: 0x4 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x18 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: f6 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x10 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 0 +// CHECK-NEXT: Type: X86_64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: 0x4 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x8 +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_GOT (4) +// CHECK-NEXT: Symbol: _foo +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x4 +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_GOT (4) +// CHECK-NEXT: Symbol: _foobar +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: Section __text { +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0xDA +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_GOT (4) +// CHECK-NEXT: Symbol: _foo +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0xD3 +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 0 +// CHECK-NEXT: Type: X86_64_RELOC_SIGNED (1) +// CHECK-NEXT: Symbol: 0x4 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0xCD +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_SIGNED (1) +// CHECK-NEXT: Symbol: f6 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0xC7 +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 0 +// CHECK-NEXT: Type: X86_64_RELOC_SIGNED (1) +// CHECK-NEXT: Symbol: 0x4 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0xC1 +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 0 +// CHECK-NEXT: Type: X86_64_RELOC_SIGNED (1) +// CHECK-NEXT: Symbol: 0x1 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0xA5 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_SUBTRACTOR (5) +// CHECK-NEXT: Symbol: _prev +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0xA5 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: _foo +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x9D +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_SUBTRACTOR (5) +// CHECK-NEXT: Symbol: _prev +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x9D +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: _foo +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x95 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: _prev +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x8D +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: _prev +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x79 +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_SIGNED_4 (8) +// CHECK-NEXT: Symbol: _prev +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x71 +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_SIGNED_2 (7) +// CHECK-NEXT: Symbol: _prev +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x69 +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_SIGNED_1 (6) +// CHECK-NEXT: Symbol: _prev +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x63 +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_SIGNED (1) +// CHECK-NEXT: Symbol: _prev +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x5C +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_SIGNED (1) +// CHECK-NEXT: Symbol: _prev +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x55 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_SUBTRACTOR (5) +// CHECK-NEXT: Symbol: _bar +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x55 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: _foo +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x4D +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_SUBTRACTOR (5) +// CHECK-NEXT: Symbol: _bar +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x4D +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: _foo +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x45 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_SUBTRACTOR (5) +// CHECK-NEXT: Symbol: _bar +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x45 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: _foo +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x3D +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: _foo +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x35 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: _foo +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x2D +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_SIGNED_4 (8) +// CHECK-NEXT: Symbol: _foo +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x26 +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_SIGNED_1 (6) +// CHECK-NEXT: Symbol: _foo +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x20 +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_SIGNED (1) +// CHECK-NEXT: Symbol: _foo +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x1A +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_SIGNED (1) +// CHECK-NEXT: Symbol: _foo +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x14 +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_GOT (4) +// CHECK-NEXT: Symbol: _foo +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0xE +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_GOT_LOAD (3) +// CHECK-NEXT: Symbol: _foo +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x7 +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_BRANCH (2) +// CHECK-NEXT: Symbol: _foo +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x2 +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_BRANCH (2) +// CHECK-NEXT: Symbol: _foo +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: Section __debug_frame { +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x8 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: _ext_foo +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x0 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 0 +// CHECK-NEXT: Type: X86_64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: 0x2 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: ] diff --git a/test/MC/MachO/linker-options.ll b/test/MC/MachO/linker-options.ll index 827adfd..2cda835 100644 --- a/test/MC/MachO/linker-options.ll +++ b/test/MC/MachO/linker-options.ll @@ -34,10 +34,6 @@ ; CHECK-OBJ: ), ; CHECK-OBJ: ]) -!0 = metadata !{ i32 6, metadata !"Linker Options", - metadata !{ - metadata !{ metadata !"-lz" }, - metadata !{ metadata !"-framework", metadata !"Cocoa" }, - metadata !{ metadata !"-lmath" } } } +!0 = !{i32 6, !"Linker Options", !{!{!"-lz"}, !{!"-framework", !"Cocoa"}, !{!"-lmath"}}} !llvm.module.flags = !{ !0 } diff --git a/test/MC/MachO/reloc.s b/test/MC/MachO/reloc.s index 2a6d5db..55c9940 100644 --- a/test/MC/MachO/reloc.s +++ b/test/MC/MachO/reloc.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -r -expand-relocs | FileCheck %s .data .long undef @@ -53,240 +53,164 @@ _f1: .long _f1 .long _f1 + 4 -// CHECK: ('cputype', 7) -// CHECK: ('cpusubtype', 3) -// CHECK: ('filetype', 1) -// CHECK: ('num_load_commands', 3) -// CHECK: ('load_commands_size', 364) -// CHECK: ('flag', 0) -// CHECK: ('load_commands', [ -// CHECK: # Load Command 0 -// CHECK: (('command', 1) -// CHECK: ('size', 260) -// CHECK: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('vm_addr', 0) -// CHECK: ('vm_size', 76) -// CHECK: ('file_offset', 392) -// CHECK: ('file_size', 76) -// CHECK: ('maxprot', 7) -// CHECK: ('initprot', 7) -// CHECK: ('num_sections', 3) -// CHECK: ('flags', 0) -// CHECK: ('sections', [ -// CHECK: # Section 0 -// CHECK: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 13) -// CHECK: ('offset', 392) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 468) -// CHECK: ('num_reloc', 2) -// CHECK: ('flags', 0x80000400) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: # Relocation 0 -// CHECK: (('word-0', 0x6), -// CHECK: ('word-1', 0x5000003)), -// CHECK: # Relocation 1 -// CHECK: (('word-0', 0x1), -// CHECK: ('word-1', 0x5000000)), -// CHECK: ]) -// CHECK: ('_section_data', 'e9f9cabe bae93a00 0000ebf4 c3') -// CHECK: # Section 1 -// CHECK: (('section_name', '__data\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 13) -// CHECK: ('size', 51) -// CHECK: ('offset', 405) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 484) -// CHECK: ('num_reloc', 11) -// CHECK: ('flags', 0x0) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: # Relocation 0 -// CHECK: (('word-0', 0x2f), -// CHECK: ('word-1', 0xc000007)), -// CHECK: # Relocation 1 -// CHECK: (('word-0', 0x2b), -// CHECK: ('word-1', 0xc000007)), -// CHECK: # Relocation 2 -// CHECK: (('word-0', 0x8000002a), -// CHECK: ('word-1', 0x1d)), -// CHECK: # Relocation 3 -// CHECK: (('word-0', 0x90000028), -// CHECK: ('word-1', 0x1d)), -// CHECK: # Relocation 4 -// CHECK: (('word-0', 0xa0000024), -// CHECK: ('word-1', 0x1d)), -// CHECK: # Relocation 5 -// CHECK: (('word-0', 0xa0000020), -// CHECK: ('word-1', 0x1d)), -// CHECK: # Relocation 6 -// CHECK: (('word-0', 0xa4000014), -// CHECK: ('word-1', 0x21)), -// CHECK: # Relocation 7 -// CHECK: (('word-0', 0xa1000000), -// CHECK: ('word-1', 0x29)), -// CHECK: # Relocation 8 -// CHECK: (('word-0', 0x8), -// CHECK: ('word-1', 0x4000002)), -// CHECK: # Relocation 9 -// CHECK: (('word-0', 0x4), -// CHECK: ('word-1', 0xc000009)), -// CHECK: # Relocation 10 -// CHECK: (('word-0', 0x0), -// CHECK: ('word-1', 0xc000009)), -// CHECK: ]) -// CHECK: ('_section_data', '00000000 04000000 15000000 00000000 00000000 ed000000 00000000 00000000 1e000000 27000000 31007600 00000004 000000') -// CHECK: # Section 2 -// CHECK: (('section_name', '__const\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 64) -// CHECK: ('size', 12) -// CHECK: ('offset', 456) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 572) -// CHECK: ('num_reloc', 4) -// CHECK: ('flags', 0x0) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: # Relocation 0 -// CHECK: (('word-0', 0x8), -// CHECK: ('word-1', 0x4000001)), -// CHECK: # Relocation 1 -// CHECK: (('word-0', 0x4), -// CHECK: ('word-1', 0x4000003)), -// CHECK: # Relocation 2 -// CHECK: (('word-0', 0xa4000000), -// CHECK: ('word-1', 0x1d)), -// CHECK: # Relocation 3 -// CHECK: (('word-0', 0xa1000000), -// CHECK: ('word-1', 0x40)), -// CHECK: ]) -// CHECK: ('_section_data', 'feffffff 44000000 00000000') -// CHECK: ]) -// CHECK: ), -// CHECK: # Load Command 1 -// CHECK: (('command', 2) -// CHECK: ('size', 24) -// CHECK: ('symoff', 604) -// CHECK: ('nsyms', 10) -// CHECK: ('stroff', 724) -// CHECK: ('strsize', 88) -// CHECK: ('_string_data', '\x00local_a_ext\x00local_a_elt\x00bar\x00undef\x00local_c\x00local_b\x00local_a\x00.objc_class_name_A\x00_f1\x00_f0\x00\x00\x00') -// CHECK: ('_symbols', [ -// CHECK: # Symbol 0 -// CHECK: (('n_strx', 51) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 2) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 25) -// CHECK: ('_string', 'local_a') -// CHECK: ), -// CHECK: # Symbol 1 -// CHECK: (('n_strx', 13) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 2) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 29) -// CHECK: ('_string', 'local_a_elt') -// CHECK: ), -// CHECK: # Symbol 2 -// CHECK: (('n_strx', 43) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 2) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 33) -// CHECK: ('_string', 'local_b') -// CHECK: ), -// CHECK: # Symbol 3 -// CHECK: (('n_strx', 35) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 2) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 41) -// CHECK: ('_string', 'local_c') -// CHECK: ), -// CHECK: # Symbol 4 -// CHECK: (('n_strx', 25) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 3) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 64) -// CHECK: ('_string', 'bar') -// CHECK: ), -// CHECK: # Symbol 5 -// CHECK: (('n_strx', 82) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 1) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', '_f0') -// CHECK: ), -// CHECK: # Symbol 6 -// CHECK: (('n_strx', 59) -// CHECK: ('n_type', 0x3) -// CHECK: ('n_sect', 0) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', '.objc_class_name_A') -// CHECK: ), -// CHECK: # Symbol 7 -// CHECK: (('n_strx', 78) -// CHECK: ('n_type', 0xf) -// CHECK: ('n_sect', 1) -// CHECK: ('n_desc', 128) -// CHECK: ('n_value', 13) -// CHECK: ('_string', '_f1') -// CHECK: ), -// CHECK: # Symbol 8 -// CHECK: (('n_strx', 1) -// CHECK: ('n_type', 0xf) -// CHECK: ('n_sect', 2) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 21) -// CHECK: ('_string', 'local_a_ext') -// CHECK: ), -// CHECK: # Symbol 9 -// CHECK: (('n_strx', 29) -// CHECK: ('n_type', 0x1) -// CHECK: ('n_sect', 0) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'undef') -// CHECK: ), -// CHECK: ]) -// CHECK: ), -// CHECK: # Load Command 2 -// CHECK: (('command', 11) -// CHECK: ('size', 80) -// CHECK: ('ilocalsym', 0) -// CHECK: ('nlocalsym', 6) -// CHECK: ('iextdefsym', 6) -// CHECK: ('nextdefsym', 3) -// CHECK: ('iundefsym', 9) -// CHECK: ('nundefsym', 1) -// CHECK: ('tocoff', 0) -// CHECK: ('ntoc', 0) -// CHECK: ('modtaboff', 0) -// CHECK: ('nmodtab', 0) -// CHECK: ('extrefsymoff', 0) -// CHECK: ('nextrefsyms', 0) -// CHECK: ('indirectsymoff', 0) -// CHECK: ('nindirectsyms', 0) -// CHECK: ('extreloff', 0) -// CHECK: ('nextrel', 0) -// CHECK: ('locreloff', 0) -// CHECK: ('nlocrel', 0) -// CHECK: ('_indirect_symbols', [ -// CHECK: ]) -// CHECK: ), -// CHECK: ]) +// CHECK: Relocations [ +// CHECK-NEXT: Section __text { +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x6 +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 0 +// CHECK-NEXT: Type: GENERIC_RELOC_VANILLA (0) +// CHECK-NEXT: Symbol: 0x3 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x1 +// CHECK-NEXT: PCRel: 1 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 0 +// CHECK-NEXT: Type: GENERIC_RELOC_VANILLA (0) +// CHECK-NEXT: Symbol: 0x0 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: Section __data { +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x2F +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: GENERIC_RELOC_VANILLA (0) +// CHECK-NEXT: Symbol: _f1 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x2B +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: GENERIC_RELOC_VANILLA (0) +// CHECK-NEXT: Symbol: _f1 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x2A +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 0 +// CHECK-NEXT: Extern: N/A +// CHECK-NEXT: Type: GENERIC_RELOC_VANILLA (0) +// CHECK-NEXT: Symbol: 0x1D +// CHECK-NEXT: Scattered: 1 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x28 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 1 +// CHECK-NEXT: Extern: N/A +// CHECK-NEXT: Type: GENERIC_RELOC_VANILLA (0) +// CHECK-NEXT: Symbol: 0x1D +// CHECK-NEXT: Scattered: 1 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x24 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: N/A +// CHECK-NEXT: Type: GENERIC_RELOC_VANILLA (0) +// CHECK-NEXT: Symbol: 0x1D +// CHECK-NEXT: Scattered: 1 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x20 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: N/A +// CHECK-NEXT: Type: GENERIC_RELOC_VANILLA (0) +// CHECK-NEXT: Symbol: 0x1D +// CHECK-NEXT: Scattered: 1 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x14 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: N/A +// CHECK-NEXT: Type: GENERIC_RELOC_LOCAL_SECTDIFF (4) +// CHECK-NEXT: Symbol: 0x21 +// CHECK-NEXT: Scattered: 1 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x0 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: N/A +// CHECK-NEXT: Type: GENERIC_RELOC_PAIR (1) +// CHECK-NEXT: Symbol: 0x29 +// CHECK-NEXT: Scattered: 1 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x8 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 0 +// CHECK-NEXT: Type: GENERIC_RELOC_VANILLA (0) +// CHECK-NEXT: Symbol: 0x2 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x4 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: GENERIC_RELOC_VANILLA (0) +// CHECK-NEXT: Symbol: undef +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x0 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: GENERIC_RELOC_VANILLA (0) +// CHECK-NEXT: Symbol: undef +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: Section __const { +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x8 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 0 +// CHECK-NEXT: Type: GENERIC_RELOC_VANILLA (0) +// CHECK-NEXT: Symbol: 0x1 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x4 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: 0 +// CHECK-NEXT: Type: GENERIC_RELOC_VANILLA (0) +// CHECK-NEXT: Symbol: 0x3 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x0 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: N/A +// CHECK-NEXT: Type: GENERIC_RELOC_LOCAL_SECTDIFF (4) +// CHECK-NEXT: Symbol: 0x1D +// CHECK-NEXT: Scattered: 1 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x0 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 2 +// CHECK-NEXT: Extern: N/A +// CHECK-NEXT: Type: GENERIC_RELOC_PAIR (1) +// CHECK-NEXT: Symbol: 0x40 +// CHECK-NEXT: Scattered: 1 +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT:] diff --git a/test/MC/MachO/x86_64-mergeable.s b/test/MC/MachO/x86_64-mergeable.s new file mode 100644 index 0000000..9724776 --- /dev/null +++ b/test/MC/MachO/x86_64-mergeable.s @@ -0,0 +1,59 @@ +// RUN: llvm-mc -triple x86_64-apple-darwin14 %s -filetype=obj -o - | llvm-readobj -r --expand-relocs | FileCheck %s + +// Test that we "S + K" produce a relocation with a symbol, but just S produces +// a relocation with the section. + + .section __TEXT,__literal4,4byte_literals +L0: + .long 42 + + .section __TEXT,__cstring,cstring_literals +L1: + .asciz "42" + + .section __DATA,__data + .quad L0 + .quad L0 + 1 + .quad L1 + .quad L1 + 1 + +// CHECK: Relocations [ +// CHECK-NEXT: Section __data { +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x18 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: L1 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x10 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 0 +// CHECK-NEXT: Type: X86_64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: 0x3 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x8 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 1 +// CHECK-NEXT: Type: X86_64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: L0 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: Relocation { +// CHECK-NEXT: Offset: 0x0 +// CHECK-NEXT: PCRel: 0 +// CHECK-NEXT: Length: 3 +// CHECK-NEXT: Extern: 0 +// CHECK-NEXT: Type: X86_64_RELOC_UNSIGNED (0) +// CHECK-NEXT: Symbol: 0x2 +// CHECK-NEXT: Scattered: 0 +// CHECK-NEXT: } +// CHECK-NEXT: } +// CHECK-NEXT: ] diff --git a/test/MC/MachO/x86_64-symbols.s b/test/MC/MachO/x86_64-symbols.s index 9788feb..f40183d 100644 --- a/test/MC/MachO/x86_64-symbols.s +++ b/test/MC/MachO/x86_64-symbols.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | macho-dump | FileCheck %s +// RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -t | FileCheck %s .text L0: @@ -121,878 +121,372 @@ D38: //L39: //D39: -// CHECK: ('cputype', 16777223) -// CHECK: ('cpusubtype', 3) -// CHECK: ('filetype', 1) -// CHECK: ('num_load_commands', 3) -// CHECK: ('load_commands_size', 2656) -// CHECK: ('flag', 0) -// CHECK: ('reserved', 0) -// CHECK: ('load_commands', [ -// CHECK: # Load Command 0 -// CHECK: (('command', 25) -// CHECK: ('size', 2552) -// CHECK: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('vm_addr', 0) -// CHECK: ('vm_size', 0) -// CHECK: ('file_offset', 2688) -// CHECK: ('file_size', 0) -// CHECK: ('maxprot', 7) -// CHECK: ('initprot', 7) -// CHECK: ('num_sections', 31) -// CHECK: ('flags', 0) -// CHECK: ('sections', [ -// CHECK: # Section 0 -// CHECK: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x80000000) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 1 -// CHECK: (('section_name', '__const\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x0) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 2 -// CHECK: (('section_name', '__static_const\x00\x00') -// CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x0) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 3 -// CHECK: (('section_name', '__cstring\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x2) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 4 -// CHECK: (('section_name', '__literal4\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 2) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x3) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 5 -// CHECK: (('section_name', '__literal8\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 3) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x4) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 6 -// CHECK: (('section_name', '__literal16\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 4) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0xe) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 7 -// CHECK: (('section_name', '__constructor\x00\x00\x00') -// CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x0) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 8 -// CHECK: (('section_name', '__destructor\x00\x00\x00\x00') -// CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x0) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 9 -// CHECK: (('section_name', '__data\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x0) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 10 -// CHECK: (('section_name', '__static_data\x00\x00\x00') -// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x0) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 11 -// CHECK: (('section_name', '__dyld\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x0) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 12 -// CHECK: (('section_name', '__mod_init_func\x00') -// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 2) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x9) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 13 -// CHECK: (('section_name', '__mod_term_func\x00') -// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 2) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0xa) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 14 -// CHECK: (('section_name', '__const\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x0) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 15 -// CHECK: (('section_name', '__class\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__OBJC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x10000000) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 16 -// CHECK: (('section_name', '__meta_class\x00\x00\x00\x00') -// CHECK: ('segment_name', '__OBJC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x10000000) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 17 -// CHECK: (('section_name', '__cat_cls_meth\x00\x00') -// CHECK: ('segment_name', '__OBJC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x10000000) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 18 -// CHECK: (('section_name', '__cat_inst_meth\x00') -// CHECK: ('segment_name', '__OBJC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x10000000) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 19 -// CHECK: (('section_name', '__protocol\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__OBJC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x10000000) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 20 -// CHECK: (('section_name', '__string_object\x00') -// CHECK: ('segment_name', '__OBJC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x10000000) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 21 -// CHECK: (('section_name', '__cls_meth\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__OBJC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x10000000) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 22 -// CHECK: (('section_name', '__inst_meth\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__OBJC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x10000000) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 23 -// CHECK: (('section_name', '__cls_refs\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__OBJC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 2) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x10000005) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 24 -// CHECK: (('section_name', '__message_refs\x00\x00') -// CHECK: ('segment_name', '__OBJC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 2) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x10000005) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 25 -// CHECK: (('section_name', '__symbols\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__OBJC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x10000000) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 26 -// CHECK: (('section_name', '__category\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__OBJC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x10000000) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 27 -// CHECK: (('section_name', '__class_vars\x00\x00\x00\x00') -// CHECK: ('segment_name', '__OBJC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x10000000) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 28 -// CHECK: (('section_name', '__instance_vars\x00') -// CHECK: ('segment_name', '__OBJC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x10000000) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 29 -// CHECK: (('section_name', '__module_info\x00\x00\x00') -// CHECK: ('segment_name', '__OBJC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x10000000) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: # Section 30 -// CHECK: (('section_name', '__selector_strs\x00') -// CHECK: ('segment_name', '__OBJC\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 0) -// CHECK: ('offset', 2688) -// CHECK: ('alignment', 0) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x2) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: ]) -// CHECK: ), -// CHECK: # Load Command 1 -// CHECK: (('command', 2) -// CHECK: ('size', 24) -// CHECK: ('symoff', 2688) -// CHECK: ('nsyms', 40) -// CHECK: ('stroff', 3328) -// CHECK: ('strsize', 152) -// CHECK: ('_string_data', '\x00D9\x00D29\x00D19\x00D8\x00L38\x00D38\x00D28\x00D18\x00D7\x00L37\x00D37\x00D27\x00D17\x00D6\x00L36\x00D36\x00D26\x00D16\x00D5\x00L35\x00D35\x00D25\x00L4\x00D4\x00D34\x00D24\x00D3\x00D33\x00D23\x00D13\x00D2\x00D32\x00D22\x00D12\x00D1\x00D31\x00D21\x00D0\x00D30\x00D20\x00\x00\x00') -// CHECK: ('_symbols', [ -// CHECK: # Symbol 0 -// CHECK: (('n_strx', 139) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 1) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D0') -// CHECK: ), -// CHECK: # Symbol 1 -// CHECK: (('n_strx', 128) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 1) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D1') -// CHECK: ), -// CHECK: # Symbol 2 -// CHECK: (('n_strx', 113) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 2) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D2') -// CHECK: ), -// CHECK: # Symbol 3 -// CHECK: (('n_strx', 98) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 3) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D3') -// CHECK: ), -// CHECK: # Symbol 4 -// CHECK: (('n_strx', 84) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 4) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'L4') -// CHECK: ), -// CHECK: # Symbol 5 -// CHECK: (('n_strx', 87) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 4) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D4') -// CHECK: ), -// CHECK: # Symbol 6 -// CHECK: (('n_strx', 69) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 5) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D5') -// CHECK: ), -// CHECK: # Symbol 7 -// CHECK: (('n_strx', 50) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 6) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D6') -// CHECK: ), -// CHECK: # Symbol 8 -// CHECK: (('n_strx', 31) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 7) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D7') -// CHECK: ), -// CHECK: # Symbol 9 -// CHECK: (('n_strx', 12) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 8) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D8') -// CHECK: ), -// CHECK: # Symbol 10 -// CHECK: (('n_strx', 1) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 9) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D9') -// CHECK: ), -// CHECK: # Symbol 11 -// CHECK: (('n_strx', 124) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 10) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D12') -// CHECK: ), -// CHECK: # Symbol 12 -// CHECK: (('n_strx', 109) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 11) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D13') -// CHECK: ), -// CHECK: # Symbol 13 -// CHECK: (('n_strx', 65) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 12) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D16') -// CHECK: ), -// CHECK: # Symbol 14 -// CHECK: (('n_strx', 46) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 13) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D17') -// CHECK: ), -// CHECK: # Symbol 15 -// CHECK: (('n_strx', 27) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 14) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D18') -// CHECK: ), -// CHECK: # Symbol 16 -// CHECK: (('n_strx', 8) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 15) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D19') -// CHECK: ), -// CHECK: # Symbol 17 -// CHECK: (('n_strx', 146) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 16) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D20') -// CHECK: ), -// CHECK: # Symbol 18 -// CHECK: (('n_strx', 135) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 17) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D21') -// CHECK: ), -// CHECK: # Symbol 19 -// CHECK: (('n_strx', 120) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 18) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D22') -// CHECK: ), -// CHECK: # Symbol 20 -// CHECK: (('n_strx', 105) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 19) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D23') -// CHECK: ), -// CHECK: # Symbol 21 -// CHECK: (('n_strx', 94) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 20) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D24') -// CHECK: ), -// CHECK: # Symbol 22 -// CHECK: (('n_strx', 80) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 21) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D25') -// CHECK: ), -// CHECK: # Symbol 23 -// CHECK: (('n_strx', 61) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 22) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D26') -// CHECK: ), -// CHECK: # Symbol 24 -// CHECK: (('n_strx', 42) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 23) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D27') -// CHECK: ), -// CHECK: # Symbol 25 -// CHECK: (('n_strx', 23) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 24) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D28') -// CHECK: ), -// CHECK: # Symbol 26 -// CHECK: (('n_strx', 4) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 25) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D29') -// CHECK: ), -// CHECK: # Symbol 27 -// CHECK: (('n_strx', 142) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 26) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D30') -// CHECK: ), -// CHECK: # Symbol 28 -// CHECK: (('n_strx', 131) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 27) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D31') -// CHECK: ), -// CHECK: # Symbol 29 -// CHECK: (('n_strx', 116) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 28) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D32') -// CHECK: ), -// CHECK: # Symbol 30 -// CHECK: (('n_strx', 101) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 29) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D33') -// CHECK: ), -// CHECK: # Symbol 31 -// CHECK: (('n_strx', 90) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 30) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D34') -// CHECK: ), -// CHECK: # Symbol 32 -// CHECK: (('n_strx', 72) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 4) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'L35') -// CHECK: ), -// CHECK: # Symbol 33 -// CHECK: (('n_strx', 76) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 4) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D35') -// CHECK: ), -// CHECK: # Symbol 34 -// CHECK: (('n_strx', 53) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 4) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'L36') -// CHECK: ), -// CHECK: # Symbol 35 -// CHECK: (('n_strx', 57) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 4) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D36') -// CHECK: ), -// CHECK: # Symbol 36 -// CHECK: (('n_strx', 34) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 4) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'L37') -// CHECK: ), -// CHECK: # Symbol 37 -// CHECK: (('n_strx', 38) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 4) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D37') -// CHECK: ), -// CHECK: # Symbol 38 -// CHECK: (('n_strx', 15) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 31) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'L38') -// CHECK: ), -// CHECK: # Symbol 39 -// CHECK: (('n_strx', 19) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 31) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 0) -// CHECK: ('_string', 'D38') -// CHECK: ), -// CHECK: ]) -// CHECK: ), -// CHECK: # Load Command 2 -// CHECK: (('command', 11) -// CHECK: ('size', 80) -// CHECK: ('ilocalsym', 0) -// CHECK: ('nlocalsym', 40) -// CHECK: ('iextdefsym', 40) -// CHECK: ('nextdefsym', 0) -// CHECK: ('iundefsym', 40) -// CHECK: ('nundefsym', 0) -// CHECK: ('tocoff', 0) -// CHECK: ('ntoc', 0) -// CHECK: ('modtaboff', 0) -// CHECK: ('nmodtab', 0) -// CHECK: ('extrefsymoff', 0) -// CHECK: ('nextrefsyms', 0) -// CHECK: ('indirectsymoff', 0) -// CHECK: ('nindirectsyms', 0) -// CHECK: ('extreloff', 0) -// CHECK: ('nextrel', 0) -// CHECK: ('locreloff', 0) -// CHECK: ('nlocrel', 0) -// CHECK: ('_indirect_symbols', [ -// CHECK: ]) -// CHECK: ), -// CHECK: ]) + .section foo, bar + .long L4 + 1 + .long L35 + 1 + .long L36 + 1 + .long L37 + 1 + .long L38 + 1 + +// CHECK: Symbols [ +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D0 (139) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __text (0x1) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D1 (128) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __text (0x1) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D2 (113) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __const (0x2) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D3 (98) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __static_const (0x3) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: L4 (84) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __cstring (0x4) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D4 (87) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __cstring (0x4) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D5 (69) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __literal4 (0x5) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D6 (50) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __literal8 (0x6) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D7 (31) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __literal16 (0x7) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D8 (12) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __constructor (0x8) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D9 (1) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __destructor (0x9) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D12 (124) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __data (0xA) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D13 (109) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __static_data (0xB) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D16 (65) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __dyld (0xC) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D17 (46) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __mod_init_func (0xD) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D18 (27) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __mod_term_func (0xE) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D19 (8) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __const (0xF) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D20 (146) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __class (0x10) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D21 (135) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __meta_class (0x11) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D22 (120) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __cat_cls_meth (0x12) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D23 (105) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __cat_inst_meth (0x13) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D24 (94) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __protocol (0x14) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D25 (80) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __string_object (0x15) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D26 (61) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __cls_meth (0x16) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D27 (42) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __inst_meth (0x17) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D28 (23) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __cls_refs (0x18) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D29 (4) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __message_refs (0x19) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D30 (142) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __symbols (0x1A) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D31 (131) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __category (0x1B) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D32 (116) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __class_vars (0x1C) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D33 (101) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __instance_vars (0x1D) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D34 (90) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __module_info (0x1E) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: L35 (72) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __cstring (0x4) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D35 (76) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __cstring (0x4) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: L36 (53) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __cstring (0x4) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D36 (57) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __cstring (0x4) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: L37 (34) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __cstring (0x4) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D37 (38) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __cstring (0x4) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: L38 (15) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __selector_strs (0x1F) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: Symbol { +// CHECK-NEXT: Name: D38 (19) +// CHECK-NEXT: Type: Section (0xE) +// CHECK-NEXT: Section: __selector_strs (0x1F) +// CHECK-NEXT: RefType: UndefinedNonLazy (0x0) +// CHECK-NEXT: Flags [ (0x0) +// CHECK-NEXT: ] +// CHECK-NEXT: Value: 0x0 +// CHECK-NEXT: } +// CHECK-NEXT: ] |