brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · a6af949 Raw
75 lines · plain
1# RUN: yaml2obj %s -o %t.o2 3# Run llvm-strip normally. This will create a stripped object file for later4# tests so we only have to run FileCheck on it once.5# RUN: cp %t.o %t.1.o6# RUN: llvm-strip --keep-symbol=foo %t.1.o -o %t.stripped.o7# RUN: llvm-readobj --symbols %t.stripped.o | FileCheck %s8 9# llvm-strip on two files:10# RUN: cp %t.o %t.1.o11# RUN: cp %t.o %t.2.o12# RUN: llvm-strip --keep-symbol=foo %t.1.o %t.2.o13# RUN: cmp %t.1.o %t.stripped.o14# RUN: cmp %t.2.o %t.stripped.o15 16# llvm-strip on three files:17# RUN: cp %t.o %t.1.o18# RUN: cp %t.o %t.2.o19# RUN: cp %t.o %t.3.o20# RUN: llvm-strip --keep-symbol=foo %t.1.o %t.2.o %t.3.o21# RUN: cmp %t.1.o %t.stripped.o22# RUN: cmp %t.2.o %t.stripped.o23# RUN: cmp %t.3.o %t.stripped.o24 25# -o cannot be used with multiple input files26# RUN: cp %t.o %t.1.o27# RUN: cp %t.o %t.2.o28# RUN: not llvm-strip --keep-symbol=foo -o %t.stripped.o %t.1.o %t.2.o 2>&1 \29# RUN:   | FileCheck %s --check-prefix=BAD-O-FLAG30 31!ELF32FileHeader:33  Class:           ELFCLASS6434  Data:            ELFDATA2LSB35  Type:            ET_REL36  Machine:         EM_X86_6437Sections:38  - Name:            .text39    Type:            SHT_PROGBITS40    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]41Symbols:42  - Name:     foo43    Type:     STT_FUNC44    Section:  .text45    Value:    0x123446    Size:     847  - Name:     bar48    Type:     STT_FUNC49    Section:  .text50    Value:    0x567851    Size:     852 53# CHECK:      Symbols [54# CHECK-NEXT:   Symbol {55# CHECK-NEXT:     Name:56# CHECK-NEXT:     Value: 0x057# CHECK-NEXT:     Size: 058# CHECK-NEXT:     Binding: Local59# CHECK-NEXT:     Type: None60# CHECK-NEXT:     Other: 061# CHECK-NEXT:     Section: Undefined62# CHECK-NEXT:   }63# CHECK-NEXT:   Symbol {64# CHECK-NEXT:     Name: foo65# CHECK-NEXT:     Value: 0x123466# CHECK-NEXT:     Size: 867# CHECK-NEXT:     Binding: Local68# CHECK-NEXT:     Type: Function69# CHECK-NEXT:     Other: 070# CHECK-NEXT:     Section: .text71# CHECK-NEXT:   }72# CHECK-NEXT: ]73 74# BAD-O-FLAG: multiple input files cannot be used in combination with -o75