Bug ID: 36367
           Summary: LLD crashes with --emit-relocs when trying to proccess
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF

Following testcase crashes because we currently assume that .rel[a] sections
follows their targets in a sections list. That is not true for .eh_frame case,
where we have synthetic IntX::EhFrame that is created together
with another synthetic sections and it collects EhInputSection inside, so
it creates output section later than .rel[a].eh_frame are proccessed.

So 'Out' local variable is null in elf::getOutputSectionName and addInputSec
we segfault. Not sure what we would want to do. Looks additional sorting to
.rel[a].eh_frame after .eh_frame might help, but it will break current
assumption that we place synthetic sections at the end and make things more
complicated. And it is not clear if we need to support this case actually. Can
we just restrict using of .eh_frame and emit-relocs together may be to fix
crash ?

# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
# RUN: ld.lld --emit-relocs  %t1.o -o %t

.globl foo
 .size foo, .Lfunc_end0-foo

You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list

Reply via email to