summaryrefslogtreecommitdiff
path: root/arch/riscv
diff options
context:
space:
mode:
authorZong Li <zong.li@sifive.com>2020-03-10 00:55:39 +0800
committerPalmer Dabbelt <palmerdabbelt@google.com>2020-03-26 09:24:39 -0700
commitbd3d914d16aaf82412771a2d673299d4b5e3aeda (patch)
tree9cb65bc5ffc29049bbbe23586cfc755788922207 /arch/riscv
parent5fde3db5eb028b95aeefa1ab192d36800414e8b8 (diff)
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 <zong.li@sifive.com> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv')
-rw-r--r--arch/riscv/kernel/vmlinux.lds.S6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S
index a8fb52a00295..9e8adca9b20f 100644
--- a/arch/riscv/kernel/vmlinux.lds.S
+++ b/arch/riscv/kernel/vmlinux.lds.S
@@ -58,6 +58,10 @@ SECTIONS
*(.srodata*)
}
+ EXCEPTION_TABLE(0x10)
+
+ _data = .;
+
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
.sdata : {
__global_pointer$ = . + 0x800;
@@ -68,8 +72,6 @@ SECTIONS
BSS_SECTION(PAGE_SIZE, PAGE_SIZE, 0)
- EXCEPTION_TABLE(0x10)
-
.rel.dyn : {
*(.rel.dyn*)
}