Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AA5BFECAAA1 for ; Thu, 15 Sep 2022 12:52:05 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4MSxtD1m4Zz3c6f for ; Thu, 15 Sep 2022 22:52:04 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=rzBMtsFq; dkim-atps=neutral Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4MSxsZ580Sz2y8L for ; Thu, 15 Sep 2022 22:51:30 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=rzBMtsFq; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4MSxsY2w0Xz4xFt; Thu, 15 Sep 2022 22:51:29 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1663246289; bh=Ma2cufPKqcaymVEQ2UKEbxWCCU3nMvR/mvpW0a4f+Mw=; h=From:To:Subject:In-Reply-To:References:Date:From; b=rzBMtsFqytlXTFxg9PUB/P5y6m/IVKPO0y8kNrEUtBbS/pFmEKI94/95fssHVX9E1 iZvyC14RQk2MxS1ohUH/aHNYGkN+9A16aRjC9JazYon+hCF1w/aWHyHB3WqRVvSHor TEWn+buorbXHbHJ2L1oJukAW8Vpr0UG3fGOAjhNa0gOmAc31K5AxvFqbGqlOWV1bic r9uUR8enFtnADAmchzckxkEtvhwz/XO74PXKMCQ13Y13znNuPRnrIysc01J+tYu87v jrQ0px1BFej9bVcPzw1uzt9k41wIpv9/7wZqJVw9vsgmZWTqGtcB09ZtxUogn76i40 4g/nLoI72vCcg== From: Michael Ellerman To: Christophe Leroy , Nicholas Piggin , "linuxppc-dev@lists.ozlabs.org" Subject: Re: [PATCH 1/7] powerpc/build: put sys_call_table in .data.rel.ro if RELOCATABLE In-Reply-To: <2e9a7e03-f89d-15d8-d42b-f5a0b1f9c391@csgroup.eu> References: <20220914154746.1122482-1-npiggin@gmail.com> <20220914154746.1122482-2-npiggin@gmail.com> <2e9a7e03-f89d-15d8-d42b-f5a0b1f9c391@csgroup.eu> Date: Thu, 15 Sep 2022 22:51:28 +1000 Message-ID: <874jx8n6lr.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Christophe Leroy writes: > Le 14/09/2022 =C3=A0 17:47, Nicholas Piggin a =C3=A9crit=C2=A0: >> Const function pointers live in .data.rel.ro rather than .rodata because >> they must be relocated. This change prevents powerpc/32 from generating >> R_PPC_UADDR32 relocations (which are not handled). The sys_call_table is >> moved to writeable memory, but a later change will move it back. > > Aren't you missing commit c7acee3d2f12 ("powerpc: align syscall table=20 > for ppc32") ? That's in fixes. I'll sort it out when I apply this, or when I merge fixes into next. > I can't see any R_PPC_UADDR32 relocations generated by ppc4xx_defconfig=20 > + CONFIG_RELOCATABLE unless I revert that commit. Presumably this change accidentally aligns the syscall table. >> After this patch, 44x_defconfig + CONFIG_RELOCATABLE boots to busybox. =20 So that's probably just because of the alignment too. I think this patch should go after .data.rel.ro is made read only. cheers