From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 29D193857371; Wed, 3 Aug 2022 09:50:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 29D193857371 From: "linkw at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/99888] Add powerpc ELFv2 support for -fpatchable-function-entry* Date: Wed, 03 Aug 2022 09:50:46 +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: linkw 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: attachments.created 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: Wed, 03 Aug 2022 09:50:51 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99888 --- Comment #2 from Kewen Lin --- Created attachment 53405 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53405&action=3Dedit untested patch With the attached patch, for -fpatchable-function-entry=3D5,2 it gets: foo: .LFB0: .cfi_startproc .LCF0: 0: addis 2,12,.TOC.-.LCF0@ha addi 2,2,.TOC.-.LCF0@l .section __patchable_function_entries,"awo",@progbits,foo .align 3 .8byte .LPFE1 .section ".text" .LPFE1: nop nop .localentry foo,.-foo .section __patchable_function_entries,"awo",@progbits,foo .align 3 .8byte .LPFE2 .section ".text" .LPFE2: nop nop nop std 31,-8(1) for -fpatchable-function-entry=3D5,1, it emits error msg: test.c:4:1: error: =E2=80=98-fpatchable-function-entry=3DM,N=E2=80=99 N NOP= s can cause assembler error due to invalid .localentry expression.=