Skip to content

Commit bd3d914

Browse files
zongboxpalmer-dabbelt
authored andcommitted
riscv: move exception table immediately after RO_DATA
Move EXCEPTION_TABLE immediately after RO_DATA. Make it easy to set the attribution of the sections which should be read-only at a time. Add _data to specify the start of data section with write permission. This patch is prepared for STRICT_KERNEL_RWX support. Signed-off-by: Zong Li <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 5fde3db commit bd3d914

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arch/riscv/kernel/vmlinux.lds.S

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ SECTIONS
5858
*(.srodata*)
5959
}
6060

61+
EXCEPTION_TABLE(0x10)
62+
63+
_data = .;
64+
6165
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
6266
.sdata : {
6367
__global_pointer$ = . + 0x800;
@@ -68,8 +72,6 @@ SECTIONS
6872

6973
BSS_SECTION(PAGE_SIZE, PAGE_SIZE, 0)
7074

71-
EXCEPTION_TABLE(0x10)
72-
7375
.rel.dyn : {
7476
*(.rel.dyn*)
7577
}

0 commit comments

Comments
 (0)