http://llvm.org/bugs/show_bug.cgi?id=22463
Bug ID: 22463
Summary: Can emit SHF_MERGE section with a sh_entsize of 0
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: MC
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Given the following IR:
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
$foo = comdat any
@foo = unnamed_addr constant [4 x i32] [i32 7, i32 8, i32 9, i32 10], comdat
define [4 x i32]* @f() {
ret [4 x i32]* @foo
}
we can emit a SHF_MERGE section with a sh_entsize of 0. This is invalid and can
cause some versions of gold to crash.
$ ~/src/llvm-build-rel/bin/llc -filetype=obj -o foo.o foo.ll
$ readelf -a -W foo.o | grep rodata.foo
[ 6] .rodata.foo PROGBITS 0000000000000000 000058 000010 00 AMG
0 0 4
$ ld.gold -r -o foo2.o foo.o
Floating point exception (core dumped)
(binutils bug fix: https://sourceware.org/ml/binutils/2015-02/msg00040.html)
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs