xref: /llvm-project/lld/test/ELF/eh-frame-type.test (revision 88498f44dfe7d9b886f2622335cdeae4dbf2b02a)
1## Show that LLD can handle .eh_frame sections of different types.
2
3# RUN: yaml2obj %s -o %t1.o -D TYPE=SHT_PROGBITS
4# RUN: ld.lld %t1.o -o %t1
5# RUN: llvm-readobj -S %t1 | FileCheck %s
6
7# RUN: yaml2obj %s -o %t2.o -D TYPE=SHT_X86_64_UNWIND
8# RUN: ld.lld %t2.o -o %t2
9# RUN: llvm-readobj -S %t2 | FileCheck %s
10
11# RUN: ld.lld %t1.o %t2.o -o %tboth
12# RUN: llvm-readobj -S %tboth | FileCheck %s
13
14# RUN: ld.lld -r %t1.o %t2.o -o %tboth.ro
15# RUN: llvm-readobj -S %tboth.ro | FileCheck %s
16
17# CHECK:      Name: .eh_frame
18# CHECK-NEXT: Type: SHT_PROGBITS
19
20--- !ELF
21FileHeader:
22  Class:   ELFCLASS64
23  Data:    ELFDATA2LSB
24  Type:    ET_REL
25  Machine: EM_X86_64
26Sections:
27  - Name:  .eh_frame
28    Type:  [[TYPE]]
29    Flags: [ SHF_ALLOC ]
30