From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zrtps0kn.nortel.com (zrtps0kn.nortel.com [47.140.192.55]) by ozlabs.org (Postfix) with ESMTP id 5C1ADDDE02 for ; Sat, 28 Jul 2007 04:56:04 +1000 (EST) Message-ID: <46AA3FB8.8030301@nortel.com> Date: Fri, 27 Jul 2007 12:55:52 -0600 From: "Chris Friesen" MIME-Version: 1.0 To: Grant Likely Subject: Re: help with ppc sections? References: <46A8F22E.6010701@nortel.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Cc: linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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: