Skip to content

Commit a538d18

Browse files
bwendlingmpe
authored andcommitted
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 <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 324a694 commit a538d18

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

arch/powerpc/boot/zImage.lds.S

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ SECTIONS
3434
__dynamic_start = .;
3535
*(.dynamic)
3636
}
37+
38+
#ifdef CONFIG_PPC64_BOOT_WRAPPER
39+
. = ALIGN(256);
40+
.got :
41+
{
42+
__toc_start = .;
43+
*(.got)
44+
*(.toc)
45+
}
46+
#endif
47+
3748
.hash : { *(.hash) }
3849
.interp : { *(.interp) }
3950
.rela.dyn :
@@ -76,16 +87,6 @@ SECTIONS
7687
_esm_blob_end = .;
7788
}
7889

79-
#ifdef CONFIG_PPC64_BOOT_WRAPPER
80-
. = ALIGN(256);
81-
.got :
82-
{
83-
__toc_start = .;
84-
*(.got)
85-
*(.toc)
86-
}
87-
#endif
88-
8990
. = ALIGN(4096);
9091
.bss :
9192
{

0 commit comments

Comments
 (0)