http://sourceware.org/bugzilla/show_bug.cgi?id=12319
Summary: Undefined reference error with LTO and `--whole-archive' Product: binutils Version: 2.22 (HEAD) Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassig...@sources.redhat.com ReportedBy: d.g.gorbac...@gmail.com CC: hjl.to...@gmail.com Created attachment 5158 --> http://sourceware.org/bugzilla/attachment.cgi?id=5158 testcase GCC 4.6.0, LD hjl/lto-mixed. $ gcc -flto -c bar.c $ ar cr libbar.a bar.o $ gcc -flto -fuse-linker-plugin main.c -Wl,--whole-archive libbar.a -Wl,--no-whole-archive foo.c /tmp/ccacBTCT.ltrans0.ltrans.o: In function `foo.1988': ccacBTCT.ltrans0.o:(.text+0x14): undefined reference to `bar' collect2: ld returned 1 exit status $ gcc -flto -fuse-linker-plugin main.c -Wl,--whole-archive libbar.a -Wl,--no-whole-archive foo.c -DICE lto1: internal compiler error: in lto_varpool_replace_node, at lto-symtab.c:306 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. lto-wrapper: i686-pc-linux-gnu-gcc-4.6.0 returned 1 exit status /usr/local/bin/ld: lto-wrapper failed collect2: ld returned 1 exit status -- 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 http://lists.gnu.org/mailman/listinfo/bug-binutils