public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "aldyh at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/47952] [trans-mem] undefined reference to transaction clone Date: Mon, 07 Mar 2011 15:37:00 -0000 [thread overview] Message-ID: <bug-47952-4-yw6eBjwwhx@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-47952-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47952 Aldy Hernandez <aldyh at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2011-03-07 15:37:06 UTC --- [These notes are from a question via email to Jakub/Richard. Saving here to keep everything in one place. Still awaiting response.] In this PR we have an undefined reference to symbol "_ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC1EPSt15_List_node_base" (see full .s in attachment). This symbol is only used in the .tm_clone_table: .section .tm_clone_table,"aw",@progbits [...] .quad _ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC1EPSt15_List_node_base [...] However, the symbol seems to be an alias to another symbol (which is used): .globl _ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC1EPSt15_List_node_base .set _ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC1EPSt15_List_node_base, _ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC2EPSt15_List_node_base Notice these are constructor variants (C1 versus C2 in the mangling). The original symbol is defined like this: .section .text._ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC2EPSt15_List_node_base,"axG",@progbits,_ZNSt14_List_iteratorIN4Game12BuildProjectEEC5EPSt15_List_node_base,comdat .align 2 .weak _ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC2EPSt15_List_node_base .type _ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC2EPSt15_List_node_base, @function _ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC2EPSt15_List_node_base: [...] [...] This is a wild guess, but should we avoid dumping symbols in the .tm_clone_table if the original function was a weak symbol? The one-liner below, fixes the undefined reference at hand, as well as a myriad of other linking problems in the Glob2 benchmark. ?? Index: varasm.c =================================================================== --- varasm.c (revision 170622) +++ varasm.c (working copy) @@ -5867,6 +5867,9 @@ finish_tm_clone_pairs_1 (void **slot, vo if (!src_n->needed) return 1; + if (DECL_WEAK (src_n->decl)) + return 1; + if (!*switched) { switch_to_section (get_named_section (NULL, ".tm_clone_table", 3));
next prev parent reply other threads:[~2011-03-07 15:37 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-03-02 12:31 [Bug c++/47952] New: " patrick.marlier at gmail dot com 2011-03-02 19:04 ` [Bug c++/47952] " aldyh at gcc dot gnu.org 2011-03-07 15:32 ` aldyh at gcc dot gnu.org 2011-03-07 15:37 ` aldyh at gcc dot gnu.org [this message] 2011-03-08 0:32 ` rth at gcc dot gnu.org 2011-03-08 0:39 ` rth at gcc dot gnu.org 2011-03-08 0:45 ` rth at gcc dot gnu.org 2011-03-08 10:18 ` patrick.marlier at gmail dot com 2011-03-08 20:02 ` rth at gcc dot gnu.org 2011-03-08 22:27 ` rth at gcc dot gnu.org 2011-03-09 12:41 ` aldyh at gcc dot gnu.org 2011-03-09 21:15 ` rth at gcc dot gnu.org 2011-03-09 23:02 ` rth at gcc dot gnu.org 2011-03-10 4:31 ` patrick.marlier at gmail dot com 2011-03-10 14:19 ` patrick.marlier at gmail dot com 2011-03-10 23:04 ` rth at gcc dot gnu.org 2011-03-10 23:42 ` rth at gcc dot gnu.org 2011-03-10 23:46 ` rth at gcc dot gnu.org 2011-03-10 23:46 ` rth 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-47952-4-yw6eBjwwhx@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).