From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2ED32385842E; Mon, 1 Aug 2022 18:29:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2ED32385842E From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/83782] [10/11 Regression] Inconsistent address for hidden ifunc in a shared library Date: Mon, 01 Aug 2022 18:29:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 7.2.1 X-Bugzilla-Keywords: ABI X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 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: Mon, 01 Aug 2022 18:29:25 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D83782 --- Comment #12 from CVS Commits --- The master branch has been updated by H.J. Lu : https://gcc.gnu.org/g:80928920147a109a7f8735bffc55a72cbe8db185 commit r13-1919-g80928920147a109a7f8735bffc55a72cbe8db185 Author: H.J. Lu Date: Wed Jul 20 16:57:32 2022 -0700 x86: Add ix86_ifunc_ref_local_ok We can't always use the PLT entry as the function address for local IFU= NC functions. When the PIC register is needed for PLT call, indirect call via the PLT entry will fail since the PIC register may not be set up properly for indirect call. Add ix86_ifunc_ref_local_ok to return false when the PLT entry can't be used as local IFUNC function pointers. gcc/ PR target/83782 * config/i386/i386.cc (ix86_ifunc_ref_local_ok): New. (TARGET_IFUNC_REF_LOCAL_OK): Use it. gcc/testsuite/ PR target/83782 * gcc.target/i386/pr83782-1.c: Require non-ia32. * gcc.target/i386/pr83782-2.c: Likewise. * gcc.target/i386/pr83782-3.c: New test.=