summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2022-09-16 14:41:24 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2022-09-26 20:58:16 +1000
commitb150a4d12b919baf956b807aa305cf78df03d0fe (patch)
treeba2cae6103c8ce646db2b7dc93dd48912c21a77b /arch/powerpc/kernel/vmlinux.lds.S
parent331771e836e6a32c8632d8cf5e2cdd94471258ad (diff)
downloadlinux-b150a4d12b919baf956b807aa305cf78df03d0fe.tar.gz
linux-b150a4d12b919baf956b807aa305cf78df03d0fe.tar.bz2
linux-b150a4d12b919baf956b807aa305cf78df03d0fe.zip
powerpc/vmlinux.lds: Add an explicit symbol for the SRWX boundary
Currently __init_begin is used as the boundary for strict RWX between executable/read-only text and data, and non-executable (after boot) code and data. But that's a little subtle, so add an explicit symbol to document that the SRWX boundary lies there, and add a comment making it clear that __init_begin must also begin there. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220916131422.318752-2-mpe@ellerman.id.au
Diffstat (limited to 'arch/powerpc/kernel/vmlinux.lds.S')
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index dacf8b4302d9..29d891329856 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -214,11 +214,16 @@ SECTIONS
}
#endif
+ /*
+ * Various code relies on __init_begin being at the strict RWX boundary.
+ */
+ . = ALIGN(STRICT_ALIGN_SIZE);
+ __srwx_boundary = .;
+ __init_begin = .;
+
/*
* Init sections discarded at runtime
*/
- . = ALIGN(STRICT_ALIGN_SIZE);
- __init_begin = .;
.init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
_sinittext = .;
INIT_TEXT