> -----Original Message-----
> From: Russell King - ARM Linux [mailto:[email protected]]
> Sent: Friday, April 30, 2010 1:18 PM
> To: Shilimkar, Santosh
> Cc: [email protected]; Linux-OMAP
> Subject: Re: [2.6.34-rc6] ARM: build breaks with KPROBES
> 
> On Fri, Apr 30, 2010 at 12:51:49PM +0530, Shilimkar, Santosh wrote:
> > Russell,
> >
> > The latest mainline ARM build breaks with KPROBES enabled. Anand
> > Gadiyar did git bisect and figured out that below commit breaks the build.
> >     commit :4260415f6a3b92c5c986398d96c314df37a4ccbf
> 
> Did you read the comments in the commit message to understand why
> .previous is dangerous?
> 
> > I tried matching the sections but failed to fix the build error. Below
> > is the hack patch to keep build working.
> 
> The previous section is not .text, but:
> 
> #ifdef CONFIG_KPROBES
>         .section        .kprobes.text,"ax",%progbits
> #else
>         .text
> #endif
> 
> Either change the preceding .data to .pushsection .data, and the following
> .text to .popsection, or duplicate the above ifdef; .pushsection/.popsection
> is _far_ safer than using .previous.
OK.
Here is the updated patch based on your suggestion.

>From 2660d4ca5d77406fc8d46a5c0f18127332914604 Mon Sep 17 00:00:00 2001
From: Santosh Shilimkar <[email protected]>
Date: Fri, 30 Apr 2010 12:41:16 +0530
Subject: [PATCH] ARM: Fix build break with KPROBES enabled

With CONFIG_KPROBES enabled two section are getting created which
leads to below build break.

LOG:
 AS      arch/arm/kernel/entry-armv.o
arch/arm/kernel/entry-armv.S: Assembler messages:
arch/arm/kernel/entry-armv.S:431: Error: symbol ret_from_exception is in a 
different section
arch/arm/kernel/entry-armv.S:490: Error: symbol ret_from_exception is in a 
different section
arch/arm/kernel/entry-armv.S:491: Error: symbol __und_usr_unknown is in a 
different section

This was introduced by commit 4260415f6a3b92c5c986398d96c314df37a4ccbf

Signed-off-by: Santosh Shilimkar <[email protected]>
Reported-by: Anand Gadiyar <[email protected]>
---
 arch/arm/kernel/entry-armv.S |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index e6a0fb0..7ee48e7 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -676,10 +676,10 @@ do_fpe:
  *  lr  = unrecognised FP instruction return address
  */
 
-       .data
+       .pushsection .data
 ENTRY(fp_enter)
        .word   no_fp
-       .text
+       .popsection
 
 ENTRY(no_fp)
        mov     pc, lr
-- 
1.6.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to