Commit bd3d914d authored by Zong Li's avatar Zong Li Committed by Palmer Dabbelt

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: default avatarZong Li <zong.li@sifive.com>
Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
parent 5fde3db5
...@@ -58,6 +58,10 @@ SECTIONS ...@@ -58,6 +58,10 @@ SECTIONS
*(.srodata*) *(.srodata*)
} }
EXCEPTION_TABLE(0x10)
_data = .;
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
.sdata : { .sdata : {
__global_pointer$ = . + 0x800; __global_pointer$ = . + 0x800;
...@@ -68,8 +72,6 @@ SECTIONS ...@@ -68,8 +72,6 @@ SECTIONS
BSS_SECTION(PAGE_SIZE, PAGE_SIZE, 0) BSS_SECTION(PAGE_SIZE, PAGE_SIZE, 0)
EXCEPTION_TABLE(0x10)
.rel.dyn : { .rel.dyn : {
*(.rel.dyn*) *(.rel.dyn*)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment