brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · 72499fd Raw
74 lines · plain
1# RUN: yaml2obj %s -o %t2# RUN: llvm-objcopy --strip-all-gnu --allow-broken-links %t %t23# RUN: llvm-strip --strip-all-gnu --allow-broken-links %t -o %t34# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s5# RUN: cmp %t2 %t36 7# Show that the debug section in a segment was removed, to match GNU.8# First validate that the offset in use is correct.9# RUN: llvm-objcopy %t %t410# RUN: od -t x1 -N 4 -j 120 %t4 | FileCheck %s --ignore-case --check-prefix=COPY-BYTES11# RUN: od -t x1 -N 4 -j 120 %t2 | FileCheck %s --ignore-case --check-prefix=STRIP-BYTES12 13!ELF14FileHeader:15  Class:           ELFCLASS6416  Data:            ELFDATA2LSB17  Type:            ET_REL18  Machine:         EM_X86_6419Sections:20  - Name:            .debug_in_segment21    Type:            SHT_PROGBITS22    Flags:           [ ]23    Content:         "deadbeef"24  - Name:            .dynstr25    Type:            SHT_STRTAB26    Flags:           [ SHF_ALLOC ]27  - Name:            .symtab28    Type:            SHT_SYMTAB29    Flags:           [ SHF_ALLOC ]30  - Name:            .text31    Type:            SHT_PROGBITS32    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]33    Size:            434  - Name:            .debug_info35    Type:            SHT_PROGBITS36    Flags:           [ ]37    AddressAlign:    0x138    Size:            439  - Name:            .debug_loc40    Type:            SHT_PROGBITS41    Flags:           [ SHF_ALLOC ]42    AddressAlign:    0x143    Size:            444  - Name:            .comment45    Type:            SHT_PROGBITS46  - Name:            .random_section_name47    Type:            SHT_PROGBITS48  - Name:            .debug_not_a_real_debug_section49    Type:            SHT_PROGBITS50  - Name:            .rel.text51    Type:            SHT_REL52    Info:            .text53  - Name:            .rela.text54    Type:            SHT_RELA55    Info:            .text56ProgramHeaders:57  # Use an arbitrary segment type to show that the segment type is unimportant.58  - Type:     0x6123456759    FirstSec: .debug_in_segment60    LastSec:  .debug_in_segment61 62# CHECK: SectionHeaderCount: 863 64# CHECK:      Name: .dynstr65# CHECK:      Name: .symtab66# CHECK:      Name: .text67# CHECK:      Name: .debug_loc68# CHECK:      Name: .comment69# CHECK:      Name: .random_section_name70# CHECK:      Name: .shstrtab71 72# COPY-BYTES:  de ad be ef73# STRIP-BYTES: 00 00 00 0074