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