diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2022-09-16 14:07:55 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-09-26 20:58:17 +1000 |
commit | fdfdcfd504933ed06eb6b4c9df21eede0e213c3e (patch) | |
tree | 6991167a022e3981f3441bc7b6711b6408a267fb | |
parent | 1e9eca485a840985a663080eb049c420272d4bdd (diff) | |
download | linux-fdfdcfd504933ed06eb6b4c9df21eede0e213c3e.tar.bz2 |
powerpc/build: put sys_call_table in .data.rel.ro if RELOCATABLE
Const function pointers by convention live in .data.rel.ro if they need
to be relocated. Now that .data.rel.ro is linked into the read-only
region, put them in the right section. This doesn't make much practical
difference, but it will make the C conversion of sys_call_table a
smaller change as far as linking goes.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220916040755.2398112-8-npiggin@gmail.com
-rw-r--r-- | arch/powerpc/kernel/systbl.S | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.S index 6c1db3b6de2d..280d6b6955e2 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 |