From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9C88B3858D1E; Mon, 15 Jan 2024 21:36:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9C88B3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705354562; bh=akv+jBxxAiHwn9m4ZS3SkoAzuAE5Bc56eaCCvTvTiHk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UuVNO7sdkpRlPf5WCz+HgVKjOF/tKR8qJbz2v9BRAsIHkA+c1wpbJVP2fzb32Up9B pIcWVHGf4W912whnegTacpabUyigI9hKotFeI3gWM/GimQ93CHUxdE9Wftw7wJyKFK Vasv4DDKFcdVZL+8gnyupw9LvXxA3xz5DO3J4y00= From: "jason at gcc dot 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 21:36:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgcc X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113403 Jason Merrill changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org --- Comment #6 from Jason Merrill --- This seems somewhat similar to the C++ issue that led to introducing STB_GNU_UNIQUE; a DSO keeping its own copy of something that we want to be shared. In the C++ case we were dealing with vague linkage variables that = we have no control over, and decided that the first copy that gets loaded is u= sed by all later DSOs, and so it can never be unloaded. Here, we have more control over the definition, and could say that everyone should get it from libgcc_s, as Jakub proposes. Or we could force it to be defined in the executable, so all DSOs will use the copy there. That latter might be another way to handle the STB_GNU_UNIQUE situation: if= an executable links against a shared library that defines something STB_GNU_UNIQUE, copy the definition from the library into the executable? = That would avoid the dlclose problem.=