https://bugs.llvm.org/show_bug.cgi?id=32664
Bug ID: 32664
Summary: [ELF] - LLD segfaults when assigns absolute value of
symbol
Product: lld
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: ELF
Assignee: unassignedb...@nondot.org
Reporter: gri...@accesssoftek.com
CC: llvm-bugs@lists.llvm.org
Reduced testcase reproducing crash is:
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
# RUN: echo "SECTIONS { aaa = ABSOLUTE(bbb); };" > %t.script
# RUN: ld.lld -o %t --script %t.script %t.o
.section .text
.globl bbb
bbb:
nop
LLD crashes here:
uint64_t ExprValue::getValue() const {
if (Sec)
return Sec->getOffset(Val) + Sec->getOutputSection()->Addr; // <-HERE
return Val;
}
Sec->getOutputSection() is nullptr;
Testcase reduced from linux kernel.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs