Merge tag 'for-linus-2021-01-24' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.git] / arch / powerpc / kernel / vmlinux.lds.S
index 0318ba436f34eb280986c13a6ca9f811cf06301a..4ab426b8b0e02276423241b25d2386eedc24b90e 100644 (file)
@@ -85,7 +85,7 @@ SECTIONS
                ALIGN_FUNCTION();
 #endif
                /* careful! __ftr_alt_* sections need to be close to .text */
-               *(.text.hot TEXT_MAIN .text.fixup .text.unlikely .fixup __ftr_alt_* .ref.text);
+               *(.text.hot .text.hot.* TEXT_MAIN .text.fixup .text.unlikely .text.unlikely.* .fixup __ftr_alt_* .ref.text);
 #ifdef CONFIG_PPC64
                *(.tramp.ftrace.text);
 #endif
@@ -187,6 +187,12 @@ SECTIONS
        .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
                _sinittext = .;
                INIT_TEXT
+
+               /*
+                *.init.text might be RO so we must ensure this section ends on
+                * a page boundary.
+                */
+               . = ALIGN(PAGE_SIZE);
                _einittext = .;
 #ifdef CONFIG_PPC64
                *(.tramp.ftrace.init);
@@ -200,6 +206,8 @@ SECTIONS
                EXIT_TEXT
        }
 
+       . = ALIGN(PAGE_SIZE);
+
        INIT_DATA_SECTION(16)
 
        . = ALIGN(8);