Skip to content

Commit 69a90d2

Browse files
Alexandre Ghitipalmer-dabbelt
authored andcommitted
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/4a6fc7a3-9697-a49b-0941-97f32194b0d7@ghiti.fr/. Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com> Link: https://lore.kernel.org/r/20230329045329.64565-3-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent 55de1e4 commit 69a90d2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

arch/riscv/kernel/vmlinux.lds.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,6 @@ SECTIONS
9696
*(.rel.dyn*)
9797
}
9898

99-
.rela.dyn : {
100-
*(.rela*)
101-
}
102-
10399
__init_data_end = .;
104100

105101
. = ALIGN(8);
@@ -126,6 +122,10 @@ SECTIONS
126122
*(.sdata*)
127123
}
128124

125+
.rela.dyn : {
126+
*(.rela*)
127+
}
128+
129129
#ifdef CONFIG_EFI
130130
.pecoff_edata_padding : { BYTE(0); . = ALIGN(PECOFF_FILE_ALIGNMENT); }
131131
__pecoff_data_raw_size = ABSOLUTE(. - __pecoff_text_end);

0 commit comments

Comments
 (0)