[Top][All Lists]

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

[Bug ld/12762] lto produces multiple definition errors for all symbols (

From: xunxun1982 at gmail dot com
Subject: [Bug ld/12762] lto produces multiple definition errors for all symbols (including CRT) in C++
Date: Tue, 20 Sep 2011 23:09:04 +0000


--- Comment #27 from xunxun <xunxun1982 at gmail dot com> 2011-09-20 23:09:04 
UTC ---
I use gcc -flto -fuse-linker-plugin main.c libm1.a merr.o -save-temps to save
some intermediate files, and this can generate a .s called ccJ5043j.ltrans0.s.

I use the command:
gcc -flto -fuse-linker-plugin ccJ5043j.ltrans0.s

it shows:

multiple definition of `__mingw_setusermatherr'
R:\Temp\cchQZ96c.o:ccJ5043j.ltrans0.o:(.text+0xa8): first defined here
multiple definition of `_matherr'
R:\Temp\cchQZ96c.o:ccJ5043j.ltrans0.o:(.text+0x0): first defined here
collect2: ld returned 1 exit status

This is different from Comment 25

I can use gcc -flto -fuse-linker-plugin ccJ5043j.ltrans0.s
-Wl,--allow-multiple-definition to build successfully.

So I think some multiple defined determination in cofflink.c is wrong, which
may be identified with discarded section.

Any ideas?

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]