Skip to content

Commit 6f55ab3

Browse files
xhackerustcpalmer-dabbelt
authored andcommitted
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 <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 54fed35 commit 6f55ab3

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

arch/riscv/kernel/vmlinux-xip.lds.S

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ SECTIONS
121121
}
122122

123123
BSS_SECTION(PAGE_SIZE, PAGE_SIZE, 0)
124-
EXCEPTION_TABLE(0x10)
125124

126125
.rel.dyn : AT(ADDR(.rel.dyn) - LOAD_OFFSET) {
127126
*(.rel.dyn*)

arch/riscv/kernel/vmlinux.lds.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* Copyright (C) 2017 SiFive
55
*/
66

7+
#define RO_EXCEPTION_TABLE_ALIGN 16
8+
79
#ifdef CONFIG_XIP_KERNEL
810
#include "vmlinux-xip.lds.S"
911
#else
@@ -112,8 +114,6 @@ SECTIONS
112114
*(.srodata*)
113115
}
114116

115-
EXCEPTION_TABLE(0x10)
116-
117117
. = ALIGN(SECTION_ALIGN);
118118
_data = .;
119119

0 commit comments

Comments
 (0)