brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.0 KiB · 8859b9e Raw
96 lines · plain
1# RUN: yaml2obj %s -o %t2 3## Show that llvm-objcopy copies relocation entries where r_extern = 0.4# RUN: llvm-objcopy %t %t25# RUN: cmp %t %t26 7## Show that llvm-objcopy updates section indices properly.8# RUN: llvm-objcopy --remove-section=__DATA,__foo %t %t39# RUN: llvm-objdump --macho --reloc %t3 | FileCheck %s10 11# CHECK:      Relocation information (__DATA,__bar) 2 entries12# CHECK-NEXT: address  pcrel length extern type    scattered symbolnum/value13# CHECK-NEXT: 00000000 False quad   False  SUB     False     2 (__DATA,__bar)14# CHECK-NEXT: 00000000 False quad   False  UNSIGND False     1 (__TEXT,__text)15 16--- !mach-o17FileHeader:18  magic:           0xFEEDFACF19  cputype:         0x0100000720  cpusubtype:      0x0000000321  filetype:        0x0000000122  ncmds:           123  sizeofcmds:      31224  flags:           0x0000000025  reserved:        0x0000000026LoadCommands:27  - cmd:             LC_SEGMENT_6428    cmdsize:         31229    segname:         ''30    vmaddr:          031    vmsize:          2432    fileoff:         34433    filesize:        2434    maxprot:         735    initprot:        736    nsects:          337    flags:           038    Sections:39      - sectname:        __text40        segname:         __TEXT41        addr:            0x000000000000000042        size:            843        offset:          0x0000015844        align:           045        reloff:          0x0000000046        nreloc:          047        flags:           0x8000000048        reserved1:       0x0000000049        reserved2:       0x0000000050        reserved3:       0x0000000051        content:         '0000000000000000'52      - sectname:        __foo53        segname:         __DATA54        addr:            0x000000000000000855        size:            856        offset:          0x0000016057        align:           058        reloff:          0x0000000059        nreloc:          060        flags:           0x0000000061        reserved1:       0x0000000062        reserved2:       0x0000000063        reserved3:       0x0000000064        content:         '0000000000000000'65      - sectname:        __bar66        segname:         __DATA67        addr:            0x000000000000001068        size:            869        offset:          0x0000016870        align:           071        reloff:          0x0000017072        nreloc:          273        flags:           0x0000000074        reserved1:       0x0000000075        reserved2:       0x0000000076        reserved3:       0x0000000077        content:         F0FFFFFFFFFFFFFF78        relocations:79          - address:         0x0000000080            symbolnum:       381            pcrel:           false82            length:          383            extern:          false84            type:            585            scattered:       false86            value:           087          - address:         0x0000000088            symbolnum:       189            pcrel:           false90            length:          391            extern:          false92            type:            093            scattered:       false94            value:           095...96