Revert "Revert "Reland D61583 [ELF] Error on relocations to STT_SECTION symbols if...
[llvm-project.git] / lld / test / ELF / relocatable-eh-frame.s
blob6172dd355db4ad99ce10116e8b5ba25c23943ca7
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3 # RUN: ld.lld -r %t.o %t.o -o %t 2>&1 | FileCheck --check-prefix=WARN %s
4 # RUN: llvm-readobj -r %t | FileCheck %s
5 # RUN: ld.lld %t -o %t.so -shared
6 # RUN: llvm-objdump -h %t.so | FileCheck --check-prefix=DSO %s
8 # WARN: STT_SECTION symbol should be defined
10 # DSO: .eh_frame 00000034
12 # CHECK: Relocations [
13 # CHECK-NEXT: Section ({{.*}}) .rela.eh_frame {
14 # CHECK-NEXT: 0x20 R_X86_64_PC32 .foo 0x0
15 # CHECK-NEXT: 0x50 R_X86_64_NONE - 0x0
16 # CHECK-NEXT: }
17 # CHECK-NEXT: ]
19 .section .foo,"aG",@progbits,bar,comdat
20 .cfi_startproc
21 .cfi_endproc