riscv: Move EXCEPTION_TABLE to RO_DATA segment

_ex_table section is read-only, so move it to RO_DATA.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
This commit is contained in:
Jisheng Zhang 2021-08-26 22:11:18 +08:00 committed by Palmer Dabbelt
parent 54fed35fd3
commit 6f55ab36be
No known key found for this signature in database
GPG Key ID: 2E1319F35FBB1889
2 changed files with 2 additions and 3 deletions

View File

@ -121,7 +121,6 @@ SECTIONS
}
BSS_SECTION(PAGE_SIZE, PAGE_SIZE, 0)
EXCEPTION_TABLE(0x10)
.rel.dyn : AT(ADDR(.rel.dyn) - LOAD_OFFSET) {
*(.rel.dyn*)

View File

@ -4,6 +4,8 @@
* Copyright (C) 2017 SiFive
*/
#define RO_EXCEPTION_TABLE_ALIGN 16
#ifdef CONFIG_XIP_KERNEL
#include "vmlinux-xip.lds.S"
#else
@ -112,8 +114,6 @@ SECTIONS
*(.srodata*)
}
EXCEPTION_TABLE(0x10)
. = ALIGN(SECTION_ALIGN);
_data = .;