87 lines · plain
1# RUN: yaml2obj %s -o %t2# RUN: cp %t %t33# RUN: llvm-objcopy --strip-all %t %t24# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s5 6# Verify that the previous llvm-objcopy's run has not modified the input.7# RUN: cmp %t %t38 9# RUN: llvm-strip %t3 10# RUN: cmp %t2 %t311 12# RUN: cp %t %t413# RUN: llvm-strip %t4 -o %t514# RUN: cmp %t2 %t515 16# Verify that the previous llvm-strip's run has not modified the input.17# RUN: cmp %t %t418 19# RUN: cp %t %t-should-remain-the-same20# RUN: llvm-strip %t4 -o %t-should-remain-the-same -o %t-should-be-stripped21# RUN: cmp %t2 %t-should-be-stripped22# RUN: cmp %t %t-should-remain-the-same23 24# RUN: rm -f %t.a25# RUN: llvm-ar crs %t.a %t26# RUN: llvm-objcopy --strip-all %t.a %t.a27# RUN: llvm-ar p %t.a > %t628# RUN: cmp %t2 %t629 30# RUN: cp %t %t731# RUN: llvm-strip --strip-all %t732# RUN: cmp %t2 %t733 34# RUN: cp %t %t835# RUN: llvm-objcopy -S %t8 %t836# RUN: cmp %t2 %t837 38# RUN: cp %t %t939# RUN: llvm-strip -s %t940# RUN: cmp %t2 %t941 42# Verify that a non-existent symbol table (after first call to llvm-strip)43# can be handled correctly.44# RUN: cp %t %t1045# RUN: llvm-strip --strip-all --keep-symbol=unavailable_symbol %t1046# RUN: llvm-strip --strip-all --keep-symbol=unavailable_symbol %t1047# RUN: cmp %t2 %t1048 49!ELF50FileHeader:51 Class: ELFCLASS6452 Data: ELFDATA2LSB53 Type: ET_REL54 Machine: EM_X86_6455Sections:56 - Name: non_alloc_in_segment57 Type: SHT_PROGBITS58 Flags: [ ]59 Size: 460 - Name: .bss61 Type: SHT_NOBITS62 Flags: [ SHF_ALLOC ]63 - Name: .text64 Type: SHT_PROGBITS65 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]66 - Name: .blarg67 Type: SHT_PROGBITS68 Flags: [ ]69 - Name: .gnu.warning.foo70 Type: SHT_PROGBITS71 - Name: .gnu_debuglink72 Type: SHT_PROGBITS73ProgramHeaders:74 # Use an arbitrary segment type to show that the segment type is unimportant.75 - Type: 0x6123456776 FirstSec: non_alloc_in_segment77 LastSec: non_alloc_in_segment78 79# CHECK: SectionHeaderCount: 780 81# CHECK: Name: non_alloc_in_segment82# CHECK: Name: .bss83# CHECK: Name: .text84# CHECK: Name: .gnu.warning.foo85# CHECK: Name: .gnu_debuglink86# CHECK: Name: .shstrtab87