brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 4f22168 Raw
51 lines · plain
1# RUN: yaml2obj %s -o %t2# RUN: llvm-objcopy --prefix-symbols prefix %t %t23# RUN: llvm-readelf --symbols %t2 | FileCheck %s --check-prefixes=COMMON,BASIC4# RUN: llvm-objcopy --redefine-sym bar=baz --prefix-symbols prefix %t %t35# RUN: llvm-readelf --symbols %t3 | FileCheck %s --check-prefixes=COMMON,REDEF6 7## Show that an empty string is permitted as the argument to8## --prefix-symbols.9# RUN: llvm-objcopy --prefix-symbols= %t2 %t410# RUN: cmp %t2 %t411 12## Show that the last prefix wins.13# RUN: llvm-objcopy --prefix-symbols foo --prefix-symbols prefix %t %t514# RUN: cmp %t2 %t515 16!ELF17FileHeader:18  Class:           ELFCLASS6419  Data:            ELFDATA2LSB20  Type:            ET_REL21  Machine:         EM_X86_6422Sections:23  - Name:            .text24    Type:            SHT_PROGBITS25    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]26    Address:         0x100027    AddressAlign:    0x000000000000001028    Size:            6429Symbols:30  - Name:     foo31    Type:     STT_SECTION32    Section:  .text33  - Name:     bar34    Type:     STT_FILE35    Section:  .text36  - Name:     foobar37    Type:     STT_FUNC38    Section:  .text39    Binding:  STB_GLOBAL40  - Name:     undef41    Binding:  STB_GLOBAL42 43# COMMON:      Symbol table '.symtab' contains 5 entries:44# COMMON-NEXT:  Num: Value Size Type Bind Vis Ndx Name45# COMMON-NEXT:   0: [[#]] 0 NOTYPE  LOCAL  {{.*}}46# COMMON-NEXT:   1: [[#]] 0 SECTION LOCAL  {{.*}} foo47# BASIC-NEXT:    2: [[#]] 0 FILE    LOCAL  {{.*}} prefixbar48# REDEF-NEXT:    2: [[#]] 0 FILE    LOCAL  {{.*}} prefixbaz49# COMMON-NEXT:   3: [[#]] 0 FUNC    GLOBAL {{.*}} prefixfoobar50# COMMON-NEXT:   4: [[#]] 0 NOTYPE  GLOBAL {{.*}} prefixundef51