public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/52401] New: lto can't handle ld script
@ 2012-02-27 14:51 tianbin at cernet dot edu.cn
  2012-02-27 14:56 ` [Bug lto/52401] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: tianbin at cernet dot edu.cn @ 2012-02-27 14:51 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-06 10:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-27 14:51 [Bug lto/52401] New: lto can't handle ld script tianbin at cernet dot edu.cn
2012-02-27 14:56 ` [Bug lto/52401] " rguenth at gcc dot gnu.org
2012-02-27 17:14 ` pinskia at gcc dot gnu.org
2012-02-28  3:44 ` tianbin at cernet dot edu.cn
2014-08-06 10:40 ` amodra at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).