public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "doko at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/52405] New: undefined references in shared library when linking the shared library with -flto Date: Mon, 27 Feb 2012 17:16:00 -0000 [thread overview] Message-ID: <bug-52405-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52405 Bug #: 52405 Summary: undefined references in shared library when linking the shared library with -flto Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto AssignedTo: unassigned@gcc.gnu.org ReportedBy: doko@gcc.gnu.org seen with the 4.6 branch, and 4.7 20120223. The object files are built with -flto as well. Linking the shared library with -flto results in unresolved symbols when linking against the share library. Not building the shared library with -flto lets the launcher link succeed. the object files (x86_64-linux-gnu) including the build script build.sh can be found at http://people.debian.org/~doko/tmp/hs.tar.xz The undefined symbols come from inline template definitions in a header file. gcc-4.7 -m64 -fpic -fno-rtti -fno-exceptions -fcheck-new -fvisibility=hidden -m64 -flto -g -O3 -fno-strict-aliasing -fno-omit-frame-pointer -fuse-linker-plugin -Xlinker -O1 -Wl,-Bsymbolic-functions -Xlinker -z -Xlinker noexecstack -m64 -Xlinker -export-dynamic -L `pwd` -o gamma launcher/java_md.o launcher/wildcard.o launcher/java.o launcher/jli_util.o -ljvm -lm -ldl -lpthread /home/packages/openjdk/7/openjdk-7-7~u3-2.1/build/openjdk.build-boot/hotspot/outputdir/linux_amd64_compiler2/product/libjvm.so: undefined reference to `void G1ParPushHeapRSClosure::do_oop_nv<oopDesc*>(oopDesc**)' /home/packages/openjdk/7/openjdk-7-7~u3-2.1/build/openjdk.build-boot/hotspot/outputdir/linux_amd64_compiler2/product/libjvm.so: undefined reference to `void FilterIntoCSClosure::do_oop_nv<oopDesc*>(oopDesc**)' /home/packages/openjdk/7/openjdk-7-7~u3-2.1/build/openjdk.build-boot/hotspot/outputdir/linux_amd64_compiler2/product/libjvm.so: undefined reference to `void G1ParPushHeapRSClosure::do_oop_nv<unsigned int>(unsigned int*)' collect2: error: ld returned 1 exit status make[8]: *** [gamma] Error 1
next reply other threads:[~2012-02-27 17:15 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-02-27 17:16 doko at gcc dot gnu.org [this message] 2012-02-28 10:46 ` [Bug lto/52405] " rguenth at gcc dot gnu.org 2012-02-28 13:38 ` doko at gcc dot gnu.org 2012-02-28 14:42 ` rguenth at gcc dot gnu.org 2021-12-26 2:01 ` pinskia at gcc dot gnu.org
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-52405-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).