1 # REQUIRES: x86-registered-target
3 ## Show that llvm-objcopy copies the indirect symbol table properly.
4 # RUN: llvm-mc -assemble -triple x86_64-apple-darwin9 -filetype=obj %s -o %t
5 # RUN: llvm-objcopy %t %t.copy
6 # RUN: llvm-readobj --symbols --macho-indirect-symbols %t.copy \
9 # __DATA,__nl_symbol_ptr
10 .non_lazy_symbol_pointer
18 # __DATA,__la_symbol_ptr
26 # CHECK-NEXT: Symbol {
27 # CHECK-NEXT: Name: bar (5)
28 # CHECK-NEXT: Type: Section (0xE)
29 # CHECK-NEXT: Section: __nl_symbol_ptr (0x2)
30 # CHECK-NEXT: RefType: UndefinedNonLazy (0x0)
31 # CHECK-NEXT: Flags [ (0x0)
33 # CHECK-NEXT: Value: 0x0
35 # CHECK-NEXT: Symbol {
36 # CHECK-NEXT: Name: baz (1)
37 # CHECK-NEXT: Type: Section (0xE)
38 # CHECK-NEXT: Section: __nl_symbol_ptr (0x2)
39 # CHECK-NEXT: RefType: UndefinedNonLazy (0x0)
40 # CHECK-NEXT: Flags [ (0x0)
42 # CHECK-NEXT: Value: 0x4
44 # CHECK-NEXT: Symbol {
45 # CHECK-NEXT: Name: foo (9)
46 # CHECK-NEXT: Type: Section (0xE)
47 # CHECK-NEXT: Section: __la_symbol_ptr (0x3)
48 # CHECK-NEXT: RefType: UndefinedNonLazy (0x0)
49 # CHECK-NEXT: Flags [ (0x0)
51 # CHECK-NEXT: Value: 0x8
54 # CHECK-NEXT: Indirect Symbols {
55 # CHECK-NEXT: Number: 2
56 # CHECK-NEXT: Symbols [
58 # CHECK-NEXT: Entry Index: 0
59 # CHECK-NEXT: Symbol Index: 0x80000000
62 # CHECK-NEXT: Entry Index: 1
63 # CHECK-NEXT: Symbol Index: 0x2