From: Bill Wendling Date: Sat, 17 Oct 2020 00:01:51 +0000 (-0700) Subject: powerpc/boot: Move the .got section to after the .dynamic section X-Git-Tag: v5.11-rc1~76^2~270 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a538d184e3f0e3b5f800c5ab148e83bb5cdd0133;p=thirdparty%2Fkernel%2Flinux.git powerpc/boot: Move the .got section to after the .dynamic section Both .dynamic and .got are RELRO sections and should be placed together, and LLD emits an error: ld.lld: error: section: .got is not contiguous with other relro sections Place them together to avoid this. Signed-off-by: Bill Wendling Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201017000151.150788-1-morbo@google.com --- diff --git a/arch/powerpc/boot/zImage.lds.S b/arch/powerpc/boot/zImage.lds.S index a21f3a76e06fc..d6f0728656273 100644 --- a/arch/powerpc/boot/zImage.lds.S +++ b/arch/powerpc/boot/zImage.lds.S @@ -34,6 +34,17 @@ SECTIONS __dynamic_start = .; *(.dynamic) } + +#ifdef CONFIG_PPC64_BOOT_WRAPPER + . = ALIGN(256); + .got : + { + __toc_start = .; + *(.got) + *(.toc) + } +#endif + .hash : { *(.hash) } .interp : { *(.interp) } .rela.dyn : @@ -76,16 +87,6 @@ SECTIONS _esm_blob_end = .; } -#ifdef CONFIG_PPC64_BOOT_WRAPPER - . = ALIGN(256); - .got : - { - __toc_start = .; - *(.got) - *(.toc) - } -#endif - . = ALIGN(4096); .bss : {