From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 01EDF3858001; Thu, 10 Jun 2021 05:02:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 01EDF3858001 From: "i at maskray dot me" To: gcc-bugs@gcc.gnu.org Subject: [Bug driver/100937] configure: Add --enable-default-semantic-interposition Date: Thu, 10 Jun 2021 05:02:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: driver X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: i at maskray dot me X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: WONTFIX 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: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 05:02:12 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100937 --- Comment #6 from Fangrui Song --- Then can you add a -fvisibility=3Dprotected variant which only applies to non-weak defined functions? Two issues need to be fixed: (1): https://sourceware.org/bugzilla/show_bug.cgi?id=3D27973 __attribute__((visibility("protected"))) void *foo () { return (void *)foo; } % gcc -fpic -shared -fuse-ld=3Dbfd a.s /usr/bin/ld.bfd: /tmp/ccWPJCLw.o: relocation R_X86_64_PC32 against protected symbol `foo' can not be used when making a shared object /usr/bin/ld.bfd: final link failed: bad value collect2: error: ld returned 1 exit status (2): https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100593 [ELF] -fno-pic: Use GOT to take address of an external default visibility function=20 Distributions want fast C++ non-vague-linkage functions can enable this opt= ion.=