From: Nicholas Piggin Date: Fri, 16 Sep 2022 04:07:55 +0000 (+1000) Subject: powerpc/build: put sys_call_table in .data.rel.ro if RELOCATABLE X-Git-Tag: baikal/mips/sdk6.1~4676^2~122 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=66214a7e3d7214aeeb79e41f99bcf4817bc3c48c;p=kernel.git 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 Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220916040755.2398112-8-npiggin@gmail.com --- diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.S index 6c1db3b6de2dc..280d6b6955e2d 100644 --- a/arch/powerpc/kernel/systbl.S +++ b/arch/powerpc/kernel/systbl.S @@ -12,7 +12,11 @@ #include +#ifdef CONFIG_RELOCATABLE +.section .data.rel.ro,"aw" +#else .section .rodata,"a" +#endif #ifdef CONFIG_PPC64 .p2align 3