Commit fdfdcfd5 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman

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: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220916040755.2398112-8-npiggin@gmail.com
parent 1e9eca48
...@@ -12,7 +12,11 @@ ...@@ -12,7 +12,11 @@
#include <asm/ppc_asm.h> #include <asm/ppc_asm.h>
#ifdef CONFIG_RELOCATABLE
.section .data.rel.ro,"aw"
#else
.section .rodata,"a" .section .rodata,"a"
#endif
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
.p2align 3 .p2align 3
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment