http://sourceware.org/bugzilla/show_bug.cgi?id=15041
Bug #: 15041
Summary: ld -r bugs for pe format (mingw)
Product: binutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: ld
AssignedTo: unassig...@sourceware.org
ReportedBy: martin.koeg...@chello.at
Classification: Unclassified
Sample code t.cxx:
-
class __declspec(dllexport) test
{
int x;
static int y;
void a() { x = y + 2; }
};
-
x86_64-w64-mingw32-gcc -c -o t.o t.cxx
x86_64-w64-mingw32-ld -r -o t1.o t.o t.o
x86_64-w64-mingw32-ld -r -o t2.o t1.o t.o
yields to the warnings:
x86_64-w64-mingw32-ld: t1.o: warning: COMDAT symbol '.pdata$_ZN4test1aEv' does
not match section name '.pdata'
x86_64-w64-mingw32-ld: t1.o: warning: COMDAT symbol '.xdata$_ZN4test1aEv' does
not match section name '.xdata'
It is caused by the fact, that the PE linker scripts of all recent binutils add
the .pdata/.xdata with (.pdata*) / (.xdata*). This way, the sections get merged
into the .pdata/.xdata section, which breaks the link once behaviour. Changing
the linker script to only use (.pdata) / (.xdata) fixes the problem.
Similar problems can occur for other sections (eg. g++ is called with -g).
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils