bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: martin.koegler at chello dot at
Subject: [Bug ld/15041] New: ld -r bugs for pe format (mingw)
Date: Sat, 19 Jan 2013 19:19:31 +0000

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: address@hidden
        ReportedBy: address@hidden
    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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]