[llvm-bugs] [Bug 27529] New: LLD/ELF --gc-sections may be overly aggressive
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Apr 26 14:24:30 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27529
Bug ID: 27529
Summary: LLD/ELF --gc-sections may be overly aggressive
Product: lld
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedbugs at nondot.org
Reporter: compnerd at compnerd.org
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
When building for elf_i386, --gc-sections can cause lld to segfault. The
following test case seems to reproduce the issue.
# cat /tmp/algorithm.s
.text
.section .text._ZNSt3__112__rs_defaultclEv,"ax", at progbits
.globl _ZNSt3__112__rs_defaultclEv
.p2align 4, 0x90
.type _ZNSt3__112__rs_defaultclEv, at function
_ZNSt3__112__rs_defaultclEv:
.cfi_startproc
.cfi_personality 155, DW.ref.__gxx_personality_v0
.cfi_endproc
.hidden DW.ref.__gxx_personality_v0
.weak DW.ref.__gxx_personality_v0
.section
.data.DW.ref.__gxx_personality_v0,"aGw", at progbits,DW.ref.__gxx_personality_v0,comdat
.p2align 2
.type DW.ref.__gxx_personality_v0, at object
.size DW.ref.__gxx_personality_v0, 4
DW.ref.__gxx_personality_v0:
.long __gxx_personality_v0
# cat /tmp/cxa_personality.s
.text
.section .text.__gxx_personality_v0,"ax", at progbits
.globl __gxx_personality_v0
.type __gxx_personality_v0, at function
__gxx_personality_v0:
# clang -target i686-unknown-linux-gnu -c /tmp/algorithm.s -o /tmp/algorithm.o
# clang -target i686-unknown-linux-gnu -c /tmp/cxa_personality.s -o
/tmp/cxa_personality.o
# lld -flavor gnu -m elf_i386 -o /tmp/reduced.so --gc-sections /tmp/algorithm.o
/tmp/cxa_personality.o
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160426/f658b523/attachment.html>
More information about the llvm-bugs
mailing list