133 lines · plain
1# RUN: yaml2obj %s -o %t2# RUN: cp %t %t13# RUN: llvm-objcopy --discard-all %t %t24## Verify that llvm-objcopy has not modified the input.5# RUN: cmp %t %t16# RUN: llvm-readobj --symbols %t2 | FileCheck %s7 8# RUN: llvm-objcopy -x %t %t39## Verify that llvm-objcopy has not modified the input.10# RUN: cmp %t %t111# RUN: cmp %t2 %t312 13## Verify that llvm-strip modifies the symbol table the same way.14# RUN: cp %t %t415# RUN: llvm-strip --discard-all %t416# RUN: cmp %t2 %t417# RUN: llvm-strip -x %t18# RUN: cmp %t2 %t19 20# CHECK: Symbols [21# CHECK-NEXT: Symbol {22# CHECK-NEXT: Name: _b (1)23# CHECK-NEXT: Extern24# CHECK-NEXT: Type: Undef (0x0)25# CHECK-NEXT: Section: (0x0)26# CHECK-NEXT: RefType: UndefinedNonLazy (0x0)27# CHECK-NEXT: Flags [ (0x220)28# CHECK-NEXT: AltEntry (0x200)29# CHECK-NEXT: NoDeadStrip (0x20)30# CHECK-NEXT: ]31# CHECK-NEXT: Value: 0x432# CHECK-NEXT: }33# CHECK-NEXT: ]34 35--- !mach-o36FileHeader:37 magic: 0xFEEDFACF38 cputype: 0x0100000739 cpusubtype: 0x0000000340 filetype: 0x0000000141 ncmds: 442 sizeofcmds: 36043 flags: 0x0000200044 reserved: 0x0000000045LoadCommands:46 - cmd: LC_SEGMENT_6447 cmdsize: 23248 segname: ''49 vmaddr: 050 vmsize: 451 fileoff: 39252 filesize: 053 maxprot: 754 initprot: 755 nsects: 256 flags: 057 Sections:58 - sectname: __text59 segname: __TEXT60 addr: 0x000000000000000061 size: 062 offset: 0x0000018863 align: 064 reloff: 0x0000000065 nreloc: 066 flags: 0x8000000067 reserved1: 0x0000000068 reserved2: 0x0000000069 reserved3: 0x0000000070 content: ''71 - sectname: __bss72 segname: __DATA73 addr: 0x000000000000000074 size: 475 offset: 0x0000000076 align: 277 reloff: 0x0000000078 nreloc: 079 flags: 0x0000000180 reserved1: 0x0000000081 reserved2: 0x0000000082 reserved3: 0x0000000083 - cmd: LC_BUILD_VERSION84 cmdsize: 2485 platform: 186 minos: 65894487 sdk: 65894488 ntools: 089 - cmd: LC_SYMTAB90 cmdsize: 2491 symoff: 39292 nsyms: 293 stroff: 42494 strsize: 895 - cmd: LC_DYSYMTAB96 cmdsize: 8097 ilocalsym: 098 nlocalsym: 199 iextdefsym: 1100 nextdefsym: 0101 iundefsym: 1102 nundefsym: 1103 tocoff: 0104 ntoc: 0105 modtaboff: 0106 nmodtab: 0107 extrefsymoff: 0108 nextrefsyms: 0109 indirectsymoff: 0110 nindirectsyms: 0111 extreloff: 0112 nextrel: 0113 locreloff: 0114 nlocrel: 0115LinkEditData:116 NameList:117 - n_strx: 4118 n_type: 0x0E119 n_sect: 2120 n_desc: 32121 n_value: 0122 - n_strx: 1123 n_type: 0x01124 n_sect: 0125 n_desc: 544126 n_value: 4127 StringTable:128 - ''129 - _b130 - _a131 - ''132...133