https://bugs.llvm.org/show_bug.cgi?id=33239
Bug ID: 33239
Summary: SHN_ABS symbols cause --gc-sections to crash
Product: lld
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: ELF
Assignee: unassignedb...@nondot.org
Reporter: smee...@fb.com
CC: compn...@compnerd.org, gri...@accesssoftek.com,
llvm-bugs@lists.llvm.org, rafael.espind...@gmail.com,
r...@google.com
% touch empty.bin
% ld.lld -m elf_x86_64 -b binary --relocatable -o empty.o empty.bin
% ld.lld -shared --gc-sections -o libempty.so empty.o
ld.lld: ../../../include/llvm/Support/Casting.h:104: static bool
llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To =
lld::elf::InputSectionBase; From = lld::elf::SectionBase]: Assertion `Val &&
"isa<> used on a null pointer"' failed.
The assertion is triggered via the cast in [1]. The symbol for which it fails
is _binary_empty_bin_size, which is absolute and has a null Section.
I'm using the first ld.lld command because it was how I came across the issue;
I believe it would generalize to any SHN_ABS symbol, however. I'm not sure if
there are scenarios in which a non-absolute symbol would trigger the assertion.
[1]
https://reviews.llvm.org/diffusion/L/browse/lld/trunk/ELF/MarkLive.cpp;304274$223?color=1
--
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