brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 53ffc9e Raw
31 lines · plain
1# RUN: yaml2obj %s -o %t.o2# RUN: not llvm-objcopy -R .foo %t.o %t1 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR1 -DINPUT=%t.o3# RUN: cp %t.o %t24# RUN: not llvm-strip --no-strip-all -R .foo %t2 2>&1 >/dev/null | FileCheck %s --check-prefix=ERR2 -DINPUT=%t25 6--- !ELF7FileHeader:8  Class:           ELFCLASS649  Data:            ELFDATA2LSB10  Type:            ET_REL11  Machine:         EM_X86_6412Sections:13  - Name:            .foo14    Type:            SHT_PROGBITS15  - Name:            .bar16    Type:            SHT_PROGBITS17    Link:            .foo18 19# ERR1: error: '[[INPUT]]': section '.foo' cannot be removed because it is referenced by the section '.bar'20# ERR2: error: '[[INPUT]]': section '.foo' cannot be removed because it is referenced by the section '.bar'21 22# RUN: llvm-objcopy --allow-broken-links -R .foo %t.o %t323# RUN: llvm-readobj --sections %t3 | FileCheck %s --check-prefix=SECTIONS --implicit-check-not=.foo24# RUN: cp %t.o %t425# RUN: llvm-strip --no-strip-all --allow-broken-links -R .foo %t426# RUN: llvm-readobj --sections %t4 | FileCheck %s --check-prefix=SECTIONS --implicit-check-not=.foo27 28# SECTIONS:      Name: .bar29# SECTIONS:      Link30# SECTIONS-SAME: : 031