This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/52401] New: lto can't handle ld script
- From: "tianbin at cernet dot edu.cn" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 27 Feb 2012 14:37:24 +0000
- Subject: [Bug lto/52401] New: lto can't handle ld script
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52401
Bug #: 52401
Summary: lto can't handle ld script
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: tianbin@cernet.edu.cn
If an object file compiled with -flto is loaded by using ld script, the final
ld procedure will report multiple definition error.
$ cat a.c
int main (){return 0;}
$ cat a.ld
INPUT(a.o)
$ gcc -flto -c a.c
$ gcc -flto a.ld
/tmp/ccPbuiPm.ltrans0.ltrans.o: In function `main':
ccPbuiPm.ltrans0.o:(.text+0x0): multiple definition of `main'
a.o:a.c:(.text+0x0): first defined here
a.o: In function `main':
a.c:(.text+0x0): multiple definition of `main'
a.o:a.c:(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
So far as I know, qt is using ld script for windows target if there are too
many object files to link.