Skip to content

Commit

Permalink
riscv: Move EXCEPTION_TABLE to RO_DATA segment
Browse files Browse the repository at this point in the history
_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>
  • Loading branch information
xhackerustc authored and palmer-dabbelt committed Sep 11, 2021
1 parent 54fed35 commit 6f55ab3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion arch/riscv/kernel/vmlinux-xip.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -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*)
Expand Down
4 changes: 2 additions & 2 deletions arch/riscv/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* Copyright (C) 2017 SiFive
*/

#define RO_EXCEPTION_TABLE_ALIGN 16

#ifdef CONFIG_XIP_KERNEL
#include "vmlinux-xip.lds.S"
#else
Expand Down Expand Up @@ -112,8 +114,6 @@ SECTIONS
*(.srodata*)
}

EXCEPTION_TABLE(0x10)

. = ALIGN(SECTION_ALIGN);
_data = .;

Expand Down

0 comments on commit 6f55ab3

Please sign in to comment.