public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "iains at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libgcc/113403] __builtin_nested_func_ptr_created, __builtin_nested_func_ptr should be dynamically linked by default Date: Mon, 15 Jan 2024 20:13:33 +0000 [thread overview] Message-ID: <bug-113403-4-GfM7WSPOpn@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-113403-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113403 --- Comment #5 from Iain Sandoe <iains at gcc dot gnu.org> --- Sorry, my intended design was not stated very clearly. 1. IIUC, the objective is to have only one instance of these symbols in the dynamically-linked program. 2. One way to ensure that is to make it a requirement that all DSOs that need these must link with libgcc_s. - However, that is not always what the user wants to do and might link a DSO with -static-libgcc - it makes DSOs built with GCC more difficult to use with other compilers. 3. An alternate solution is to have COMDAT/Weak Definitions (I'm not sure if I've got exactly the right terminology for ELF; Weak Definition is the right one for Mach-o). - then the dynamic linker picks only one in the loaded program, so the duplication is avoided - this also works when DSOs are used with a foreign compiler without libgcc_s --- For my ports the second is the most practical, since my downsteams use GCC and clang together, but I have no strong opinion on what should be done in general.
next prev parent reply other threads:[~2024-01-15 20:13 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-15 16:42 [Bug libgcc/113403] New: " fw at gcc dot gnu.org 2024-01-15 17:07 ` [Bug libgcc/113403] " iains at gcc dot gnu.org 2024-01-15 17:11 ` fw at gcc dot gnu.org 2024-01-15 17:24 ` iains at gcc dot gnu.org 2024-01-15 17:46 ` jakub at gcc dot gnu.org 2024-01-15 20:13 ` iains at gcc dot gnu.org [this message] 2024-01-15 21:36 ` jason at gcc dot gnu.org 2024-01-16 8:04 ` [Bug libgcc/113403] [14 Regression] " rguenth at gcc dot gnu.org 2024-01-16 9:00 ` fw at gcc dot gnu.org 2024-01-16 9:06 ` jakub at gcc dot gnu.org 2024-01-16 9:15 ` iains at gcc dot gnu.org 2024-01-16 9:22 ` jakub at gcc dot gnu.org 2024-01-16 11:12 ` fw at gcc dot gnu.org 2024-01-16 11:21 ` iains at gcc dot gnu.org 2024-01-21 23:37 ` iains at gcc dot gnu.org 2024-01-30 9:33 ` cvs-commit at gcc dot gnu.org 2024-01-30 9:33 ` cvs-commit at gcc dot gnu.org 2024-01-30 19:03 ` jakub at gcc dot gnu.org 2024-02-01 20:10 ` cvs-commit 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-113403-4-GfM7WSPOpn@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).