All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Nicholas Piggin <npiggin@gmail.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH 1/7] powerpc/build: put sys_call_table in .data.rel.ro if RELOCATABLE
Date: Thu, 15 Sep 2022 05:53:44 +0000	[thread overview]
Message-ID: <2e9a7e03-f89d-15d8-d42b-f5a0b1f9c391@csgroup.eu> (raw)
In-Reply-To: <20220914154746.1122482-2-npiggin@gmail.com>



Le 14/09/2022 à 17:47, Nicholas Piggin a écrit :
> 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 
for ppc32") ?

I can't see any R_PPC_UADDR32 relocations generated by ppc4xx_defconfig 
+ CONFIG_RELOCATABLE unless I revert that commit.



> 
> After this patch, 44x_defconfig + CONFIG_RELOCATABLE boots to busybox.
> 
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
>   arch/powerpc/kernel/systbl.S | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.S
> index cb3358886203..0bec33e86f50 100644
> --- a/arch/powerpc/kernel/systbl.S
> +++ b/arch/powerpc/kernel/systbl.S
> @@ -12,7 +12,11 @@
>   
>   #include <asm/ppc_asm.h>
>   
> +#ifdef CONFIG_RELOCATABLE
> +.section .data.rel.ro,"aw"
> +#else
>   .section .rodata,"a"
> +#endif
>   
>   #ifdef CONFIG_PPC64
>   	.p2align	3

  reply	other threads:[~2022-09-15  5:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14 15:47 [PATCH 0/7] powerpc: build / linker improvements Nicholas Piggin
2022-09-14 15:47 ` [PATCH 1/7] powerpc/build: put sys_call_table in .data.rel.ro if RELOCATABLE Nicholas Piggin
2022-09-15  5:53   ` Christophe Leroy [this message]
2022-09-15 12:51     ` Michael Ellerman
2022-09-16  0:30       ` Nicholas Piggin
2022-09-14 15:47 ` [PATCH 2/7] powerpc: move __end_rodata to cover arch read-only sections Nicholas Piggin
2022-09-15  5:50   ` Christophe Leroy
2022-09-15 12:47   ` Michael Ellerman
2022-09-16  0:28     ` Nicholas Piggin
2022-09-16  6:35       ` Michael Ellerman
2022-09-14 15:47 ` [PATCH 3/7] powerpc/32/build: move got1/got2 sections out of text Nicholas Piggin
2022-09-14 15:47 ` [PATCH 4/7] powerpc/build: move got, toc, plt, branch_lt sections to read-only Nicholas Piggin
2022-09-14 15:47 ` [PATCH 5/7] powerpc/build: move .data.rel.ro, .sdata2 " Nicholas Piggin
2022-09-14 15:47 ` [PATCH 6/7] powerpc/64/build: only include .opd with ELFv1 Nicholas Piggin
2022-09-14 15:47 ` [PATCH 7/7] powerpc/64/build: merge .got and .toc input sections Nicholas Piggin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2e9a7e03-f89d-15d8-d42b-f5a0b1f9c391@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.