brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.6 KiB · c022e0f Raw
167 lines · yaml
1# REQUIRES: x862# RUN: mkdir -p %t3# RUN: yaml2obj %s -o %t/libnoid.dylib4# RUN: echo ".globl _main; .text; _main: ret" | llvm-mc -filetype=obj -triple=x86_64-apple-darwin -o %t/no-id-dylink.o5# RUN: not %lld -o %t/no-id-dylink -L%t -lnoid %t/no-id-dylink.o 2>&1 | FileCheck %s6# CHECK: error: {{.*}}libnoid.dylib: dylib missing LC_ID_DYLIB load command7 8## This YAML file was originally generated from linking the following source9## input with ld64 and passing the resulting binary through obj2yaml:10##11## .section __TEXT,__cstring12## .globl _hello_world13##14## _hello_world:15## .asciz "Hello world!\n"16##17## Then we deleted the LC_ID_DYLIB command from the file.18 19!mach-o20FileHeader:21  magic:           0xFEEDFACF22  cputype:         0x0100000723  cpusubtype:      0x0000000324  filetype:        0x0000000625  ncmds:           1026  sizeofcmds:      61627  flags:           0x0010008528  reserved:        0x0000000029LoadCommands:30  - cmd:             LC_SEGMENT_6431    cmdsize:         23232    segname:         __TEXT33    vmaddr:          034    vmsize:          409635    fileoff:         036    filesize:        409637    maxprot:         538    initprot:        539    nsects:          240    flags:           041    Sections:42      - sectname:        __text43        segname:         __TEXT44        addr:            0x0000000000000FF245        size:            046        offset:          0x00000FF247        align:           048        reloff:          0x0000000049        nreloc:          050        flags:           0x8000040051        reserved1:       0x0000000052        reserved2:       0x0000000053        reserved3:       0x0000000054        content:         ''55      - sectname:        __cstring56        segname:         __TEXT57        addr:            0x0000000000000FF258        size:            1459        offset:          0x00000FF260        align:           061        reloff:          0x0000000062        nreloc:          063        flags:           0x0000000264        reserved1:       0x0000000065        reserved2:       0x0000000066        reserved3:       0x0000000067        content:         48656C6C6F20776F726C64210A0068  - cmd:             LC_SEGMENT_6469    cmdsize:         7270    segname:         __LINKEDIT71    vmaddr:          409672    vmsize:          409673    fileoff:         409674    filesize:        6475    maxprot:         176    initprot:        177    nsects:          078    flags:           079  - cmd:             LC_DYLD_INFO_ONLY80    cmdsize:         4881    rebase_off:      082    rebase_size:     083    bind_off:        084    bind_size:       085    weak_bind_off:   086    weak_bind_size:  087    lazy_bind_off:   088    lazy_bind_size:  089    export_off:      409690    export_size:     2491  - cmd:             LC_SYMTAB92    cmdsize:         2493    symoff:          412894    nsyms:           195    stroff:          414496    strsize:         1697  - cmd:             LC_DYSYMTAB98    cmdsize:         8099    ilocalsym:       0100    nlocalsym:       0101    iextdefsym:      0102    nextdefsym:      1103    iundefsym:       1104    nundefsym:       0105    tocoff:          0106    ntoc:            0107    modtaboff:       0108    nmodtab:         0109    extrefsymoff:    0110    nextrefsyms:     0111    indirectsymoff:  0112    nindirectsyms:   0113    extreloff:       0114    nextrel:         0115    locreloff:       0116    nlocrel:         0117  - cmd:             LC_UUID118    cmdsize:         24119    uuid:            4826226E-9210-3984-A388-D5BD6D6DB368120  - cmd:             LC_BUILD_VERSION121    cmdsize:         32122    platform:        1123    minos:           659200124    sdk:             659200125    ntools:          1126    Tools:127      - tool:            3128        version:         34734080129  - cmd:             LC_SOURCE_VERSION130    cmdsize:         16131    version:         0132  - cmd:             LC_FUNCTION_STARTS133    cmdsize:         16134    dataoff:         4120135    datasize:        8136  - cmd:             LC_DATA_IN_CODE137    cmdsize:         16138    dataoff:         4128139    datasize:        0140LinkEditData:141  ExportTrie:142    TerminalSize:    0143    NodeOffset:      0144    Name:            ''145    Flags:           0x0000000000000000146    Address:         0x0000000000000000147    Other:           0x0000000000000000148    ImportName:      ''149    Children:150      - TerminalSize:    3151        NodeOffset:      16152        Name:            _hello_world153        Flags:           0x0000000000000000154        Address:         0x0000000000000FF2155        Other:           0x0000000000000000156        ImportName:      ''157  NameList:158    - n_strx:          2159      n_type:          0x0F160      n_sect:          2161      n_desc:          0162      n_value:         4082163  StringTable:164    - ' '165    - _hello_world166    - ''167