brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 10228e6 Raw
78 lines · plain
1# RUN: yaml2obj %s -o %t2# RUN: cp %t %t13# RUN: llvm-objcopy --strip-all --keep-symbol foo %t %t24# RUN: llvm-readobj --sections --symbols %t2 | FileCheck %s5 6# Verify that the first run of llvm-objcopy7# has not modified the input binary.8# RUN: cmp %t %t19 10# RUN: llvm-strip --keep-symbol=foo %t111# RUN: cmp %t1 %t212 13# RUN: cp %t %t314# RUN: llvm-strip --keep-symbol foo %t315# RUN: cmp %t1 %t316 17!ELF18FileHeader:19  Class:           ELFCLASS6420  Data:            ELFDATA2LSB21  Type:            ET_REL22  Machine:         EM_X86_6423Sections:24  - Name:            .text25    Type:            SHT_PROGBITS26    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]27    Address:         0x100028    AddressAlign:    0x000000000000001029    Size:            6430  - Name:            .gnu.warning.foo31    Type:            SHT_PROGBITS32  - Name:            .debug_bar33    Type:            SHT_PROGBITS34Symbols:35  - Name:     foo36    Type:     STT_FUNC37    Section:  .text38    Value:    0x100039    Size:     840  - Name:     bar41    Type:     STT_FUNC42    Section:  .text43    Value:    0x100844    Size:     845  - Name:     baz46    Type:     STT_FUNC47    Section:  .text48    Value:    0x101049    Size:     850 51# CHECK:     Name: .text52# CHECK:     Name: .gnu.warning.foo53# CHECK:     Name: .symtab54# CHECK:     Name: .strtab55# CHECK:     Name: .shstrtab56# CHECK-NOT: Name: .debug_bar57 58#CHECK: Symbols [59#CHECK-NEXT:  Symbol {60#CHECK-NEXT:    Name:61#CHECK-NEXT:    Value: 0x062#CHECK-NEXT:    Size: 063#CHECK-NEXT:    Binding: Local64#CHECK-NEXT:    Type: None65#CHECK-NEXT:    Other: 066#CHECK-NEXT:    Section: Undefined67#CHECK-NEXT:  }68#CHECK-NEXT:  Symbol {69#CHECK-NEXT:    Name: foo70#CHECK-NEXT:    Value: 0x100071#CHECK-NEXT:    Size: 872#CHECK-NEXT:    Binding: Local73#CHECK-NEXT:    Type: Function74#CHECK-NEXT:    Other: 075#CHECK-NEXT:    Section: .text76#CHECK-NEXT:  }77#CHECK-NEXT:]78