[LLVMbugs] [Bug 524] NEW: [X86] Linkonce symbols are not emitted to a link-once section
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sun Feb 20 20:41:43 PST 2005
http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=524
Summary: [X86] Linkonce symbols are not emitted to a link-once
section
Product: libraries
Version: 1.0
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: X86 Backend
AssignedTo: unassignedbugs at nondot.org
ReportedBy: sabre at nondot.org
Consider the following testcase:
---
struct Foo
Foo();
virtual ~Foo();
};
struct Bar {
Bar();
virtual ~Bar();
virtual bool test(bool) const;
};
struct Baz : public Foo, public Bar {
Baz();
virtual ~Baz();
virtual bool test(bool) const;
};
bool Baz::test(bool) const { return true; }
Baz::~Baz() {}
----
This has a bunch of stuff, but the important part is that it requires virtual
function thunks to be emitted. These thunks have linkonce linkage, but the X86
backend emits them like this (for example):
.text
.align 16
.globl _ZThn4_N3BazD0Ev
.type _ZThn4_N3BazD0Ev, @function
_ZThn4_N3BazD0Ev:
...
G++, on the other hand, emits them like this:
.set .LTHUNK2,_ZN3BazD0Ev
.section .gnu.linkonce.t._ZThn4_N3BazD0Ev,"ax", at progbits
.align 2
.p2align 4,,15
.weak _ZThn4_N3BazD0Ev
.type _ZThn4_N3BazD0Ev, @function
_ZThn4_N3BazD0Ev:
...
.size _ZThn4_N3BazD0Ev, .-_ZThn4_N3BazD0Ev
This is causing link failures when building shared libraries with llc for QT.
-Chris
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list