From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 83A2F388B696; Fri, 25 Nov 2022 03:21:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 83A2F388B696 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669346475; bh=C3MSKnm176AhPubZj1XTZUwNdAWCx5Qklz7AOqtcrms=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Sa3BLWt/97z1o8mFdBF/dGXqghLrI75wWZyxnXhbqXuSPanzH++ypS24ZnSxKf9bi MmX2wosSo1qcj2pHSSmEcr6+gtudTz/Mt5V0K/jiHhwanNoCDhniVSDYgkEWeVMkre iy692Lpes7l1eFlTnnFZp+NFFcoKGNHGJh54yLTs= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/99889] Add powerpc ELFv1 support for -fpatchable-function-entry* with "o" sections Date: Fri, 25 Nov 2022 03:21:12 +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: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: linkw 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99889 --- Comment #3 from CVS Commits --- The master branch has been updated by Kewen Lin : https://gcc.gnu.org/g:f120196382ac5ac49ec4a60f8abad42f22d45a91 commit r13-4294-gf120196382ac5ac49ec4a60f8abad42f22d45a91 Author: Kewen.Lin Date: Thu Nov 24 21:17:28 2022 -0600 Adjust the symbol for SECTION_LINK_ORDER linked_to section [PR99889] As discussed in PR98125, -fpatchable-function-entry with SECTION_LINK_ORDER support doesn't work well on powerpc64 ELFv1 because the filled "Symbol" in .section name,"flags"o,@type,Symbol sits in .opd section instead of in the function_section like .text or named .text*. Since we already generates one label LPFE* which sits in function_section of current_function_decl, this patch is to reuse it as the symbol for the linked_to section. It avoids the above ABI specific issue when using the symbol concluded from current_function_decl. Besides, with this support some previous workarounds can be reverted. PR target/99889 gcc/ChangeLog: * config/rs6000/rs6000.cc (rs6000_print_patchable_function_entr= y): Adjust to call function default_print_patchable_function_entry. * targhooks.cc (default_print_patchable_function_entry_1): Remo= ve and move the flags preparation ... (default_print_patchable_function_entry): ... here, adjust to u= se current_function_funcdef_no for label no. * targhooks.h (default_print_patchable_function_entry_1): Remov= e. * varasm.cc (default_elf_asm_named_section): Adjust code for __patchable_function_entries section support with LPFE label. gcc/testsuite/ChangeLog: * g++.dg/pr93195a.C: Remove the skip on powerpc*-*-* 64-bit. * gcc.target/aarch64/pr92424-2.c: Adjust LPFE1 with LPFE0. * gcc.target/aarch64/pr92424-3.c: Likewise. * gcc.target/i386/pr93492-2.c: Likewise. * gcc.target/i386/pr93492-3.c: Likewise. * gcc.target/i386/pr93492-4.c: Likewise. * gcc.target/i386/pr93492-5.c: Likewise.=