diff options
author | Bill Wendling <morbo@google.com> | 2020-10-17 02:01:51 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-11-26 12:05:42 +0100 |
commit | a538d184e3f0e3b5f800c5ab148e83bb5cdd0133 (patch) | |
tree | 186aa34fb888a69f8980844b39edadb12aac9e64 /arch/powerpc/boot/zImage.lds.S | |
parent | powerpc/ptrace: Hard wire PT_SOFTE value to 1 in gpr_get() too (diff) | |
download | linux-a538d184e3f0e3b5f800c5ab148e83bb5cdd0133.tar.xz linux-a538d184e3f0e3b5f800c5ab148e83bb5cdd0133.zip |
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 <morbo@google.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201017000151.150788-1-morbo@google.com
Diffstat (limited to 'arch/powerpc/boot/zImage.lds.S')
-rw-r--r-- | arch/powerpc/boot/zImage.lds.S | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/arch/powerpc/boot/zImage.lds.S b/arch/powerpc/boot/zImage.lds.S index a21f3a76e06f..d6f072865627 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 : { |