http://sourceware.org/bugzilla/show_bug.cgi?id=13779
Bug #: 13779 Summary: multiple definition symbol error when using gcc's lto and ld script Product: binutils Version: unspecified Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassig...@sourceware.org ReportedBy: tian...@cernet.edu.cn Classification: Unclassified 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 This bug is also subbmited to gcc, please go to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52401 -- 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. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils