[LLVMbugs] [Bug 20793] New: Third field of llvm.global_ctors not used on ELF
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Aug 28 14:55:19 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=20793
Bug ID: 20793
Summary: Third field of llvm.global_ctors not used on ELF
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: rafael.espindola at gmail.com
CC: llvmbugs at cs.uiuc.edu, rnk at google.com
Classification: Unclassified
This is just a reminder of a missing feature.
Given
-----------------------------------
@v = weak_odr global i8 0
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void
\
()*, i8* } { i32 65535, void ()* @f, i8* @v}]
define void @f() {
entry:
ret void
}
--------------------------------------------
With x86_64-pc-win32 we produce
-----------------------------------------------
.section .bss,"bw",discard,v
.globl v # @v
v:
.byte 0 # 0x0
.section .CRT$XCU,"rd",associative,v
.align 8
.quad f
------------------------------------------------
but with x86_64-pc-linux
we produce
-----------------------------------------------
.section .bss.v,"aGw", at nobits,v,comdat
.weak v
v:
.byte 0 # 0x0
.size v, 1
.section .ctors,"aw", at progbits
.align 8
.quad f
-----------------------------------------------
We could put this .ctors section in the v comdat.
--
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/20140828/3a22c436/attachment.html>
More information about the llvm-bugs
mailing list