Bug 161 - Comdat group doesn't work well with .gnu.linkonce sections
Summary: Comdat group doesn't work well with .gnu.linkonce sections
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
: 246 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-05-14 15:14 UTC by H.J. Lu
Modified: 2006-11-17 08:08 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
A testcase for i386 (392 bytes, application/octet-stream)
2004-05-14 15:15 UTC, H.J. Lu
Details
corrected testcase (437 bytes, application/x-gzip)
2006-11-17 08:08 UTC, Alan Modra
Details

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2004-05-14 15:14:17 UTC
When there are 2 compilers, one uses comdat and the other uses
.gnu.linkonce, their outputs may not work together.
Comment 1 H.J. Lu 2004-05-14 15:15:18 UTC
Created attachment 77 [details]
A testcase for i386

[hjl@gnu comdat-4]$ make
as   -o x.o x.s
as   -o y.o y.s
ld -r -o foo.o x.o y.o
y.o(.text+0x0): In function `__i686.get_pc_thunk.bx':
: multiple definition of `__i686.get_pc_thunk.bx'
x.o(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0): first defined here
make: *** [foo.o] Error 1
Comment 2 H.J. Lu 2004-05-14 21:11:57 UTC
A patch is posted at

http://sources.redhat.com/ml/binutils/2004-05/msg00297.html
Comment 3 H.J. Lu 2004-07-02 14:33:56 UTC
*** Bug 246 has been marked as a duplicate of this bug. ***
Comment 5 Alan Modra 2006-11-17 08:08:25 UTC
Created attachment 1426 [details]
corrected testcase

Original testcase had an extra '.' in the comdat group name