help with ppc sections?
Chris Friesen
cfriesen at nortel.com
Sat Jul 28 04:55:52 EST 2007
Grant Likely wrote:
> Mild question; What the *@*#^$! are you doing trying to backport to a
> 2 year old kernel?!? :-)
That's what happens in the embedded space. It's the current version
from our distro vendor. It's also the version that all our different
board suppliers could agree to provide support for.
Of course, it's also a royal pain.
>> Unfortunately for me, ppc doesn't have a ".section" line in that macro,
>> so I'm at a bit of a loss.
> Just add the section. Should be trivial to do. You might have to add
> it to the linker script as well.
I've done the linker script part already. As for the processor.h bit,
does this seem reasonable? It seems to do the trick based on the
function addresses, but I may be missing something and I haven't
actually booted it yet.
The ppc64 version appends ',"a"' to the kprobes.text section line. Is
this needed here as well? Could someone elaborate on exactly what its
purpose is?
Thanks,
Chris
Index: linux-ias/include/asm-ppc/processor.h
===================================================================
--- linux-ias.orig/include/asm-ppc/processor.h
+++ linux-ias/include/asm-ppc/processor.h
@@ -38,6 +38,13 @@
#define _GLOBAL(n)\
.stabs __stringify(n:F-1),N_FUN,0,0,n;\
+ .section ".text"; \
+ .globl n;\
+n:
+
+#define _KPROBE(n)\
+ .stabs __stringify(n:F-1),N_FUN,0,0,n;\
+ .section ".kprobes.text","a"; \
.globl n;\
n:
More information about the Linuxppc-dev
mailing list