Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / MachO / invalid / invalid-relocation-pcrel.yaml
blob4b3ad19c3d33c551c719c50501cd10406442b8cd
1 # REQUIRES: x86
2 # RUN: rm -rf %t; mkdir %t
3 # RUN: yaml2obj %s -o %t/test.o
4 # RUN: llvm-ar rcs %t/test.a %t/test.o
5 # RUN: not %lld -o /dev/null %t/test.a 2>&1 | FileCheck %s
7 # CHECK: error: UNSIGNED relocation must not be PC-relative at offset 1 of __TEXT,__text in {{.*}}test.a(test.o)
9 !mach-o
10 FileHeader:
11   magic:           0xFEEDFACF
12   cputype:         0x01000007
13   cpusubtype:      0x00000003
14   filetype:        0x00000001
15   ncmds:           4
16   sizeofcmds:      280
17   flags:           0x00000000
18   reserved:        0x00000000
19 LoadCommands:
20   - cmd:             LC_SEGMENT_64
21     cmdsize:         152
22     segname:         ''
23     vmaddr:          0
24     vmsize:          9
25     fileoff:         312
26     filesize:        9
27     maxprot:         7
28     initprot:        7
29     nsects:          1
30     flags:           0
31     Sections:
32       - sectname:        __text
33         segname:         __TEXT
34         addr:            0x0000000000000000
35         size:            9
36         offset:          0x00000138
37         align:           0
38         reloff:          0x00000144
39         nreloc:          1
40         flags:           0x80000000
41         reserved1:       0x00000000
42         reserved2:       0x00000000
43         reserved3:       0x00000000
44         content:         '000000000000000000'
45         relocations:
46           - address:         0x00000001
47             symbolnum:       1
48             pcrel:           true
49             length:          3
50             extern:          true
51             type:            0
52             scattered:       false
53             value:           0
54   - cmd:             LC_BUILD_VERSION
55     cmdsize:         24
56     platform:        1
57     minos:           659200
58     sdk:             0
59     ntools:          0
60   - cmd:             LC_SYMTAB
61     cmdsize:         24
62     symoff:          332
63     nsyms:           2
64     stroff:          364
65     strsize:         12
66   - cmd:             LC_DYSYMTAB
67     cmdsize:         80
68     ilocalsym:       0
69     nlocalsym:       0
70     iextdefsym:      0
71     nextdefsym:      2
72     iundefsym:       2
73     nundefsym:       0
74     tocoff:          0
75     ntoc:            0
76     modtaboff:       0
77     nmodtab:         0
78     extrefsymoff:    0
79     nextrefsyms:     0
80     indirectsymoff:  0
81     nindirectsyms:   0
82     extreloff:       0
83     nextrel:         0
84     locreloff:       0
85     nlocrel:         0
86 LinkEditData:
87   NameList:
88     - n_strx:          1
89       n_type:          0x0F
90       n_sect:          1
91       n_desc:          0
92       n_value:         1
93     - n_strx:          6
94       n_type:          0x0F
95       n_sect:          1
96       n_desc:          0
97       n_value:         9
98   StringTable:
99     - ''
100     - _foo
101     - _main