lkml.org 
[lkml]   [2009]   [Dec]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Valid relocation symbol for FLAT format on ARM
On Thu, Dec 31, 2009 at 01:52:08PM -0500, Mike Frysinger wrote:
> On Sat, Dec 26, 2009 at 11:36, Jun Sun wrote:
> > Apparently newer GCC would generate ANCHOR symbols beyond the end of
> > data/bss segment on ARM CPUs. As a result, the exiting validity checking
> > for relocation symbols in FLAT format will fail.
> >
> > This also fixes a cosmetic error in printk. Text segment and data/bss
> > segment are allocated from two different areas. It is not meaningful to
> > give the diff between them in error reporting messages.
> >
> > Signed-off-by: Jun Sun <jsun@junsun.net>
> >
> > diff -Nru linux-2.6.32.2/arch/arm/include/asm/flat.h.orig linux-2.6.32.2/arch/arm/include/asm/flat.h
>
> you really should use git to generate the patch. if you're going to
> do it by hand, you need to format it correctly. you're missing the
> --- marker between your change log and the start of the patch.
>
> > --- linux-2.6.32.2/fs/binfmt_flat.c
> > +++ linux-2.6.32.2/fs/binfmt_flat.c
> > @@ -355,7 +355,7 @@
> >
> > ?? ?? ?? ??if (!flat_reloc_valid(r, start_brk - start_data + text_len)) {
> > ?? ?? ?? ?? ?? ?? ?? ??printk("BINFMT_FLAT: reloc outside program 0x%x (0 - 0x%x/0x%x)",
> > - ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??(int) r,(int)(start_brk-start_code),(int)text_len);
> > + ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??(int) r,(int)(start_brk-start_data+text_len),(int)text_len);
> > ?? ?? ?? ?? ?? ?? ?? ??goto failed;
> > ?? ?? ?? ??}
>
> this should be a separate patch since it is unrelated to your other change
> -mike

Thanks for the feedback. Have not submitted any patches for a while.
New patches are coming in a sec.

Cheers.

Jun


\
 
 \ /
  Last update: 2010-01-01 02:19    [W:0.074 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site