powerpc/ftrace: Move ftrace stub used for init text before _einittext
authorNaveen N Rao <naveen@kernel.org>
Wed, 30 Oct 2024 07:08:41 +0000 (12:38 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 31 Oct 2024 00:00:54 +0000 (11:00 +1100)
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 <naveen@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://patch.msgid.link/20241030070850.1361304-9-hbathini@linux.ibm.com
arch/powerpc/kernel/vmlinux.lds.S

index 7ab4e2f..b4c9dec 100644 (file)
@@ -265,14 +265,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,