brintos

brintos / llvm-project-archived public Read only

0
0
Text · 989 B · ab98519 Raw
34 lines · plain
1## Stripping unneeded symbols from execuatble/DSO should2## eliminate the static symbol table, because it's not used3## by the dynamic loader. 4 5# RUN: yaml2obj %s -o %t.exec -DTYPE=EXEC6# RUN: llvm-objcopy --strip-unneeded %t.exec %t2.exec7# RUN: llvm-readobj --section-headers %t2.exec | FileCheck %s --check-prefix=NOSYMTAB8## Validate that the symtab wouldn't be removed if the input were an ET_REL.9# RUN: yaml2obj %s -o %t.rel -DTYPE=REL10# RUN: llvm-objcopy --strip-unneeded %t.rel %t2.rel11# RUN: llvm-readobj --section-headers %t2.rel | FileCheck %s --check-prefix=SYMTAB12 13!ELF14FileHeader:15  Class:    ELFCLASS6416  Data:     ELFDATA2LSB17  Type:     ET_[[TYPE]]18  Machine:  EM_X86_6419Sections:20  - Name: .text21    Type: SHT_PROGBITS22Symbols:23  - Name:     local_undef24  - Name:     local_def25    Section:  .text26  - Name:     global_undef27    Binding:  STB_GLOBAL28  - Name:     global_def29    Section:  .text30    Binding:  STB_GLOBAL31 32# NOSYMTAB-NOT: .symtab33# SYMTAB:       .symtab34