[3/3] powerpc: move KPROBES_TEXT between text.head and .text

Milton Miller miltonm at bga.com
Fri Jul 11 07:17:45 EST 2008


The exception vectors in .text.head need to call functions in KPROBES_TEXT.
By moving the section closer, we can avoid the linker generated stubs.

The section is small enough that the architecture code in .text called
from .text.head still does not require stubs.


Signed-off-by: Milton Miller <miltonm at bga.com>
---
Only tested with head_64, but all other head_* use .text.head already
Requires 1/3 and 2/3

diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 87a72c6..d0fe85f 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -35,10 +35,10 @@ SECTIONS
 		ALIGN_FUNCTION();
 		*(.text.head)
 		_text = .;
+		KPROBES_TEXT
 		*(.text .fixup .text.init.refok .exit.text.refok __ftr_alt_*)
 		SCHED_TEXT
 		LOCK_TEXT
-		KPROBES_TEXT
 
 #ifdef CONFIG_PPC32
 		*(.got1)



More information about the Linuxppc-dev mailing list