]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/mach-o/objc_export_list.yaml
Vendor import of lld trunk r233088:
[FreeBSD/FreeBSD.git] / test / mach-o / objc_export_list.yaml
1 # RUN: lld -flavor darwin -arch x86_64 -dylib %s -o %t \
2 # RUN:     -exported_symbol .objc_class_name_Foo %p/Inputs/libSystem.yaml
3 # RUN: llvm-nm -m %t | FileCheck %s
4 #
5 # Test that exported objc classes can be specificed using old naming
6 # (.e.g .objc_class_name_Foo instead of _OBJC_CLASS_$_Foo)
7 #
8
9 --- !mach-o
10 arch:            x86_64
11 file-type:       MH_OBJECT
12 flags:           [ MH_SUBSECTIONS_VIA_SYMBOLS ]
13 sections:
14   - segment:         __DATA
15     section:         __objc_data
16     type:            S_REGULAR
17     attributes:      [  ]
18     alignment:       3
19     address:         0x0000000000000000
20     content:         [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
21                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
22                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
23                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
24                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
25                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
26                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
27                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
28                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
29                        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ]
30     relocations:
31       - offset:          0x00000030
32         type:            X86_64_RELOC_UNSIGNED
33         length:          3
34         pc-rel:          false
35         extern:          true
36         symbol:          0
37       - offset:          0x00000028
38         type:            X86_64_RELOC_UNSIGNED
39         length:          3
40         pc-rel:          false
41         extern:          true
42         symbol:          1
43       - offset:          0x00000000
44         type:            X86_64_RELOC_UNSIGNED
45         length:          3
46         pc-rel:          false
47         extern:          true
48         symbol:          1
49 global-symbols:
50   - name:            '_OBJC_CLASS_$_Foo'
51     type:            N_SECT
52     scope:           [ N_EXT ]
53     sect:            1
54     value:           0x0000000000000000
55   - name:            '_OBJC_METACLASS_$_Foo'
56     type:            N_SECT
57     scope:           [ N_EXT ]
58     sect:            1
59     value:           0x0000000000000028
60 ...
61
62 # CHECK:  (__DATA,__objc_data) external _OBJC_CLASS_$_Foo
63 # CHECK:  (__DATA,__objc_data) external _OBJC_METACLASS_$_Foo