brintos

brintos / llvm-project-archived public Read only

0
0
Text · 917 B · 66f088c Raw
31 lines · plain
1## When multiple sections have the same name, and --rename-section is specified,2## GNU objcopy renames all these sections. This test shows that llvm-objcopy3## does the same.4 5## Note: we have to do this test in two stages because yaml2obj cannot handle6## multiple sections with the same name. This has the benefit of showing that7## we can rename to an already existing name.8# RUN: yaml2obj %s -o %t.o9 10## First make two sections with the same name...11# RUN: llvm-objcopy --rename-section=.foo=.bar %t.o %t2.o12## ... then rename them both.13# RUN: llvm-objcopy --rename-section=.bar=.baz %t2.o %t3.o14# RUN: llvm-readobj --sections %t3.o | FileCheck %s15 16--- !ELF17FileHeader:18  Class:   ELFCLASS6419  Data:    ELFDATA2LSB20  Type:    ET_REL21  Machine: EM_X86_6422Sections:23  - Name:  .foo24    Type:  SHT_PROGBITS25    Flags: [ SHF_ALLOC ]26  - Name:  .bar27    Type:  SHT_PROGBITS28 29# CHECK: Name: .baz30# CHECK: Name: .baz31