]> git.baikalelectronics.ru Git - kernel.git/commitdiff
riscv: Move EXCEPTION_TABLE to RO_DATA segment
authorJisheng Zhang <jszhang@kernel.org>
Thu, 26 Aug 2021 14:11:18 +0000 (22:11 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Sat, 11 Sep 2021 06:59:48 +0000 (23:59 -0700)
_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>
arch/riscv/kernel/vmlinux-xip.lds.S
arch/riscv/kernel/vmlinux.lds.S

index af776555ded947983d632864b43d026af9062a89..9c9f35091ef04bb7637c285f21d10368f4819390 100644 (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*)
index 502d0826ecb14c85ad7c6a4f74a438e37b91a20b..5104f3a871e38237b6b1a66b5d5c1e52b83c8881 100644 (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 = .;