public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "tianbin at cernet dot edu.cn" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/52401] New: lto can't handle ld script Date: Mon, 27 Feb 2012 14:51:00 -0000 [thread overview] Message-ID: <bug-52401-4@http.gcc.gnu.org/bugzilla/> (raw) 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.
next reply other threads:[~2012-02-27 14:37 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-02-27 14:51 tianbin at cernet dot edu.cn [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-52401-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).