diff options
author | Alexandre Ghiti <[email protected]> | 2023-03-29 06:53:25 +0200 |
---|---|---|
committer | Palmer Dabbelt <[email protected]> | 2023-04-19 07:46:29 -0700 |
commit | 69a90d2fe107c8bf6a424af0f30d2b223cdeaf7c (patch) | |
tree | ff1c8332241b04240bb1316807e8b4ef4b7231b3 | |
parent | 55de1e4ad43b375566162ae0cc2b56dfa44aae4e (diff) |
riscv: Move .rela.dyn outside of init to avoid empty relocations
This is a preparatory patch for relocatable kernels: .rela.dyn should be
in .init but doing so actually produces empty relocations, so this should
be a temporary commit until we find a solution.
This issue was reported here [1].
[1] https://lore.kernel.org/all/[email protected]/.
Signed-off-by: Alexandre Ghiti <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
-rw-r--r-- | arch/riscv/kernel/vmlinux.lds.S | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S index 1c38294580c0..e05e6df44225 100644 --- a/arch/riscv/kernel/vmlinux.lds.S +++ b/arch/riscv/kernel/vmlinux.lds.S @@ -96,10 +96,6 @@ SECTIONS *(.rel.dyn*) } - .rela.dyn : { - *(.rela*) - } - __init_data_end = .; . = ALIGN(8); @@ -126,6 +122,10 @@ SECTIONS *(.sdata*) } + .rela.dyn : { + *(.rela*) + } + #ifdef CONFIG_EFI .pecoff_edata_padding : { BYTE(0); . = ALIGN(PECOFF_FILE_ALIGNMENT); } __pecoff_data_raw_size = ABSOLUTE(. - __pecoff_text_end); |