llvm-project/lld/test/ELF/emit-relocs-eh-frame.s
George Rimar 54634f1990 [ELF] - Another fix for "LLD crashes with --emit-relocs when trying to proccess .eh_frame"
This fixes PR36367 which is about segfault when --emit-relocs is
used together with .eh_frame sections which happens because
of reordering of regular and .rel[a] sections.

Path changes loop that iterates over input sections to create
relocation target sections first.

Differential revision: https://reviews.llvm.org/D44679

llvm-svn: 328299
2018-03-23 09:18:31 +00:00

17 lines
382 B
ArmAsm

# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
# RUN: ld.lld --emit-relocs %t1.o -o %t
# RUN: llvm-readobj -r %t | FileCheck %s
# CHECK: Relocations [
# CHECK-NEXT: Section {{.*}} .rela.eh_frame {
# CHECK-NEXT: 0x{{.*}} R_X86_64_PC32 .text 0x0
# CHECK-NEXT: }
# CHECK-NEXT: ]
.text
.globl foo
foo:
.cfi_startproc
.cfi_endproc