summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2022-09-16 14:40:57 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2022-09-26 20:58:16 +1000
commit331771e836e6a32c8632d8cf5e2cdd94471258ad (patch)
tree7a318e7017baf34d26775248a71e370a78d30a68 /arch/powerpc/kernel/vmlinux.lds.S
parent0c32903197ce9f7119aee75a6bcaa4b49e0cd21a (diff)
powerpc/vmlinux.lds: Ensure STRICT_ALIGN_SIZE is at least page aligned
Add a check that STRICT_ALIGN_SIZE is aligned to at least PAGE_SIZE. That then makes the alignment to PAGE_SIZE immediately after the alignment to STRICT_ALIGN_SIZE redundant, so remove it. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220916131422.318752-1-mpe@ellerman.id.au
Diffstat (limited to 'arch/powerpc/kernel/vmlinux.lds.S')
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 0f2a10b029e8..dacf8b4302d9 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -32,6 +32,10 @@
#define STRICT_ALIGN_SIZE (1 << CONFIG_DATA_SHIFT)
+#if STRICT_ALIGN_SIZE < PAGE_SIZE
+#error "CONFIG_DATA_SHIFT must be >= PAGE_SHIFT"
+#endif
+
ENTRY(_stext)
PHDRS {
@@ -215,7 +219,6 @@ SECTIONS
*/
. = ALIGN(STRICT_ALIGN_SIZE);
__init_begin = .;
- . = ALIGN(PAGE_SIZE);
.init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
_sinittext = .;
INIT_TEXT