diff options
author | Nicholas Piggin | 2022-09-16 14:07:50 +1000 |
---|---|---|
committer | Michael Ellerman | 2022-09-26 20:58:17 +1000 |
commit | 1faa1235c1a00614bc4849a8dbd0790363c9a22f (patch) | |
tree | 1b0684a412de0e163c5fd15b91bd49e6d2cdbd20 /arch/powerpc/kernel/vmlinux.lds.S | |
parent | 7082f8e7d2276575a8806370007cbb4a7b9abdce (diff) |
powerpc/32/build: move got1/got2 sections out of text
Following the example from the binutils default linker script, move
.got1 and .got2 out of .text, to just after RO_DATA.
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-3-npiggin@gmail.com
Diffstat (limited to 'arch/powerpc/kernel/vmlinux.lds.S')
-rw-r--r-- | arch/powerpc/kernel/vmlinux.lds.S | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 5fe33a659029..a922c348b4f7 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S @@ -126,14 +126,6 @@ SECTIONS *(.sfpr); MEM_KEEP(init.text) MEM_KEEP(exit.text) - -#ifdef CONFIG_PPC32 - *(.got1) - __got2_start = .; - *(.got2) - __got2_end = .; -#endif /* CONFIG_PPC32 */ - } :text . = ALIGN(PAGE_SIZE); @@ -143,7 +135,16 @@ SECTIONS /* Read-only data */ RO_DATA(PAGE_SIZE) -#ifdef CONFIG_PPC64 +#ifdef CONFIG_PPC32 + .got1 : AT(ADDR(.got1) - LOAD_OFFSET) { + *(.got1) + } + .got2 : AT(ADDR(.got2) - LOAD_OFFSET) { + __got2_start = .; + *(.got2) + __got2_end = .; + } +#else /* CONFIG_PPC32 */ SOFT_MASK_TABLE(8) RESTART_TABLE(8) @@ -194,7 +195,7 @@ SECTIONS *(__rfi_flush_fixup) __stop___rfi_flush_fixup = .; } -#endif /* CONFIG_PPC64 */ +#endif /* CONFIG_PPC32 */ #ifdef CONFIG_PPC_BARRIER_NOSPEC . = ALIGN(8); |