Move the ftrace stub used to cover inittext before _einittext so that it
is within kernel text, as seen through core_kernel_text(). This is
required for a subsequent change to ftrace.

Signed-off-by: Naveen N Rao <nav...@kernel.org>
---
 arch/powerpc/kernel/vmlinux.lds.S | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/vmlinux.lds.S 
b/arch/powerpc/kernel/vmlinux.lds.S
index f420df7888a7..0aef9959f2cd 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -267,14 +267,13 @@ SECTIONS
        .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
                _sinittext = .;
                INIT_TEXT
-
+               *(.tramp.ftrace.init);
                /*
                 *.init.text might be RO so we must ensure this section ends on
                 * a page boundary.
                 */
                . = ALIGN(PAGE_SIZE);
                _einittext = .;
-               *(.tramp.ftrace.init);
        } :text
 
        /* .exit.text is discarded at runtime, not link time,
-- 
2.45.2


Reply via email to