From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 505D23857714; Thu, 7 Mar 2024 14:23:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 505D23857714 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709821385; bh=cv2LG4oLruNsUnVZxC4L5NPJ9frJylZCpKvHzwDVpcQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Xt0By8Uwv6UoeWZ/kpMh/L394W+8O7bGdtlxSJGmv8Zn/dPllUkmqJsSA+BKIQaX6 bo5OmhCqG3YuQ9wWHo3Hzmbt23btvUm4Oz/BGu84VW0sTmc/IGzojBw+76Qefmd0Iu nBbVjcyT+HMZ/1izCgC4uSXAhjPCxkBoxtxo1Y1o= From: "fxcoudert at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/113617] [14 Regression] Symbol ... referenced in section `.data.rel.ro.local' of ...: defined in discarded section ... since r14-4944 Date: Thu, 07 Mar 2024 14:23:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: link-failure, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: fxcoudert at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113617 --- Comment #26 from Francois-Xavier Coudert = --- PS: I can confirm two things: 1. Your patch above is still necessary 2. In conjunction with the darwin-specific fix below, the testcase now pass= es: diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index ae33c4f1e3a..467b539b20d 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -1390,7 +1390,7 @@ proc check_effective_target_shared { } { # here to be undefined. set extra_flags "" if { [istarget *-*-darwin\[912\]*] } { - set extra_flags "-Wl,-U,_foo,-U,_bar" + set extra_flags "-Wl,-U,_foo,-U,_bar,-U,__Z3foov" } # Note that M68K has a multilib that supports -fpic but not # -fPIC, so we need to check both. We test with a program that=