2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 06:34:11 +08:00

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>
This commit is contained in:
Zong Li 2020-03-10 00:55:39 +08:00 committed by Palmer Dabbelt
parent 5fde3db5eb
commit bd3d914d16
No known key found for this signature in database
GPG Key ID: 2E1319F35FBB1889

View File

@ -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*)
}