[Bug ld/15041] New: ld -r bugs for pe format (mingw)

2013-01-19 Thread martin.koegler at chello dot at
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


[Bug ld/15041] ld -r bugs for pe format (mingw)

2013-01-19 Thread martin.koegler at chello dot at
http://sourceware.org/bugzilla/show_bug.cgi?id=15041

--- Comment #1 from martin.koegler at chello dot at 2013-01-19 19:21:08 UTC ---
Created attachment 6828
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6828
GCC generated assembler code for easier reproduction

-- 
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


[Bug ld/15041] ld -r bugs for pe format (mingw)

2013-01-19 Thread martin.koegler at chello dot at
http://sourceware.org/bugzilla/show_bug.cgi?id=15041

martin.koegler at chello dot at changed:

   What|Removed |Added

   Attachment #6828|application/octet-stream|text/plain
  mime type||

-- 
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