linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* unexpected non-allocatable section
@ 2009-05-03  2:41 Sean MacLennan
  2009-05-03  7:04 ` Sean MacLennan
  2009-05-03 10:45 ` Stephen Rothwell
  0 siblings, 2 replies; 10+ messages in thread
From: Sean MacLennan @ 2009-05-03  2:41 UTC (permalink / raw)
  To: linuxppc-dev

Latest pull from Linus' git.

Cheers,
   Sean

WARNING: vmlinux.o (.text): unexpected non-allocatable section.
Did you forget to use "ax"/"aw" in a .S file?
Note that for example <linux/init.h> contains
section definitions for use in .S files.

WARNING: vmlinux.o (.head.text): unexpected non-allocatable section.
WARNING: vmlinux.o (.init.text): unexpected non-allocatable section.
WARNING: vmlinux.o (.ref.text): unexpected non-allocatable section.
WARNING: vmlinux.o (.cpuinit.text): unexpected non-allocatable section.
WARNING: vmlinux.o (.sched.text): unexpected non-allocatable section.
WARNING: vmlinux.o (.meminit.text): unexpected non-allocatable section.
WARNING: vmlinux.o (.exit.text): unexpected non-allocatable section.
WARNING: vmlinux.o (.devexit.text): unexpected non-allocatable section.
WARNING: vmlinux.o (.devinit.text): unexpected non-allocatable section.
WARNING: vmlinux.o (.rodata): unexpected non-allocatable section.
WARNING: vmlinux.o (__param): unexpected non-allocatable section.
WARNING: vmlinux.o (__ksymtab): unexpected non-allocatable section.
WARNING: vmlinux.o (__ksymtab_strings): unexpected non-allocatable section.
WARNING: vmlinux.o (.rodata.str1.4): unexpected non-allocatable section.
WARNING: vmlinux.o (__bug_table): unexpected non-allocatable section.
WARNING: vmlinux.o (__ksymtab_gpl): unexpected non-allocatable section.
WARNING: vmlinux.o (.init.ramfs): unexpected non-allocatable section.
WARNING: vmlinux.o (__ex_table): unexpected non-allocatable section.
WARNING: vmlinux.o (.kprobes.text): unexpected non-allocatable section.
WARNING: vmlinux.o (__ftr_alt_97): unexpected non-allocatable section.
WARNING: vmlinux.o (__ftr_fixup): unexpected non-allocatable section.
WARNING: vmlinux.o (.rodata.cst4): unexpected non-allocatable section.
WARNING: vmlinux.o (.fixup): unexpected non-allocatable section.
WARNING: vmlinux.o (.data): unexpected non-allocatable section.
WARNING: vmlinux.o (.init.setup): unexpected non-allocatable section.
WARNING: vmlinux.o (.init.data): unexpected non-allocatable section.
WARNING: vmlinux.o (.data.read_mostly): unexpected non-allocatable section.
WARNING: vmlinux.o (.initcallrootfs.init): unexpected non-allocatable section.
WARNING: vmlinux.o (.initcall3.init): unexpected non-allocatable section.
WARNING: vmlinux.o (.data.page_aligned): unexpected non-allocatable section.
WARNING: vmlinux.o (.data.init_task): unexpected non-allocatable section.
WARNING: vmlinux.o (.initcall6.init): unexpected non-allocatable section.
WARNING: vmlinux.o (.initcall4.init): unexpected non-allocatable section.
WARNING: vmlinux.o (.cpuinit.data): unexpected non-allocatable section.
WARNING: vmlinux.o (.initcall2.init): unexpected non-allocatable section.
WARNING: vmlinux.o (.con_initcall.init): unexpected non-allocatable section.
WARNING: vmlinux.o (.initcall7.init): unexpected non-allocatable section.
WARNING: vmlinux.o (.machine.desc): unexpected non-allocatable section.
WARNING: vmlinux.o (.data.cacheline_aligned): unexpected non-allocatable section.
WARNING: vmlinux.o (.initcallearly.init): unexpected non-allocatable section.
WARNING: vmlinux.o (.initcall1.init): unexpected non-allocatable section.
WARNING: vmlinux.o (.initcall5.init): unexpected non-allocatable section.
WARNING: vmlinux.o (.ref.data): unexpected non-allocatable section.
WARNING: vmlinux.o (.meminit.data): unexpected non-allocatable section.
WARNING: vmlinux.o (.exitcall.exit): unexpected non-allocatable section.
WARNING: vmlinux.o (.init.rodata): unexpected non-allocatable section.
WARNING: vmlinux.o (.devinit.data): unexpected non-allocatable section.
WARNING: vmlinux.o (.initcall0.init): unexpected non-allocatable section.
WARNING: vmlinux.o (.initcall7s.init): unexpected non-allocatable section.
WARNING: vmlinux.o (.sdata): unexpected non-allocatable section.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: unexpected non-allocatable section
  2009-05-03  2:41 unexpected non-allocatable section Sean MacLennan
@ 2009-05-03  7:04 ` Sean MacLennan
  2009-05-03 10:45 ` Stephen Rothwell
  1 sibling, 0 replies; 10+ messages in thread
From: Sean MacLennan @ 2009-05-03  7:04 UTC (permalink / raw)
  To: linuxppc-dev

b614a697dc17dff82f140d72d21a095f810fa7fb is first bad commit
commit b614a697dc17dff82f140d72d21a095f810fa7fb
Author: Anders Kaseorg <andersk@mit.edu>
Date:   Thu Apr 23 16:49:33 2009 -0400

    kbuild, modpost: Check the section flags, to catch missing "ax"/"aw"
    
    When you put
      .section ".foo"
    in an assembly file instead of
      .section "foo", "ax"
    , one of the possible symptoms is that modpost will see an
    ld-generated section name ".foo.1" in section_rel() or section_rela().
    But this heuristic has two problems: it will miss a bad section that
    has no relocations, and it will incorrectly flag many gcc-generated
    sections as bad when compiling with -ffunction-sections
    -fdata-sections.
    
    On mips it fixes a lot of bogus warnings with gcc 4.4.0 lije this one:
    WARNING: crypto/cryptd.o (.text.T.349): unexpected section name.
    
    So instead of checking whether the section name matches a particular
    pattern, we directly check for a missing SHF_ALLOC in the section
    flags.
    
    Signed-off-by: Anders Kaseorg <andersk@mit.edu>
    Tested-by: Ralf Baechle <ralf@linux-mips.org>
    Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

:040000 040000 9931d6ed1b6f9e836517162b15e757c8ad13d69e f1134de951b415eb7f5831898c827daf93c96c1a M      scripts

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: unexpected non-allocatable section
  2009-05-03  2:41 unexpected non-allocatable section Sean MacLennan
  2009-05-03  7:04 ` Sean MacLennan
@ 2009-05-03 10:45 ` Stephen Rothwell
  2009-05-03 16:39   ` Sean MacLennan
  1 sibling, 1 reply; 10+ messages in thread
From: Stephen Rothwell @ 2009-05-03 10:45 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: linuxppc-dev, Sam Ravnborg

[-- Attachment #1: Type: text/plain, Size: 4314 bytes --]

Hi Sean,

On Sat, 2 May 2009 22:41:26 -0400 Sean MacLennan <smaclennan@pikatech.com> wrote:
>
> Latest pull from Linus' git.
> 
> Cheers,
>    Sean
> 
> WARNING: vmlinux.o (.text): unexpected non-allocatable section.
> Did you forget to use "ax"/"aw" in a .S file?
> Note that for example <linux/init.h> contains
> section definitions for use in .S files.
> 
> WARNING: vmlinux.o (.head.text): unexpected non-allocatable section.
> WARNING: vmlinux.o (.init.text): unexpected non-allocatable section.
> WARNING: vmlinux.o (.ref.text): unexpected non-allocatable section.
> WARNING: vmlinux.o (.cpuinit.text): unexpected non-allocatable section.
> WARNING: vmlinux.o (.sched.text): unexpected non-allocatable section.
> WARNING: vmlinux.o (.meminit.text): unexpected non-allocatable section.
> WARNING: vmlinux.o (.exit.text): unexpected non-allocatable section.
> WARNING: vmlinux.o (.devexit.text): unexpected non-allocatable section.
> WARNING: vmlinux.o (.devinit.text): unexpected non-allocatable section.
> WARNING: vmlinux.o (.rodata): unexpected non-allocatable section.
> WARNING: vmlinux.o (__param): unexpected non-allocatable section.
> WARNING: vmlinux.o (__ksymtab): unexpected non-allocatable section.
> WARNING: vmlinux.o (__ksymtab_strings): unexpected non-allocatable section.
> WARNING: vmlinux.o (.rodata.str1.4): unexpected non-allocatable section.
> WARNING: vmlinux.o (__bug_table): unexpected non-allocatable section.
> WARNING: vmlinux.o (__ksymtab_gpl): unexpected non-allocatable section.
> WARNING: vmlinux.o (.init.ramfs): unexpected non-allocatable section.
> WARNING: vmlinux.o (__ex_table): unexpected non-allocatable section.
> WARNING: vmlinux.o (.kprobes.text): unexpected non-allocatable section.
> WARNING: vmlinux.o (__ftr_alt_97): unexpected non-allocatable section.
> WARNING: vmlinux.o (__ftr_fixup): unexpected non-allocatable section.
> WARNING: vmlinux.o (.rodata.cst4): unexpected non-allocatable section.
> WARNING: vmlinux.o (.fixup): unexpected non-allocatable section.
> WARNING: vmlinux.o (.data): unexpected non-allocatable section.
> WARNING: vmlinux.o (.init.setup): unexpected non-allocatable section.
> WARNING: vmlinux.o (.init.data): unexpected non-allocatable section.
> WARNING: vmlinux.o (.data.read_mostly): unexpected non-allocatable section.
> WARNING: vmlinux.o (.initcallrootfs.init): unexpected non-allocatable section.
> WARNING: vmlinux.o (.initcall3.init): unexpected non-allocatable section.
> WARNING: vmlinux.o (.data.page_aligned): unexpected non-allocatable section.
> WARNING: vmlinux.o (.data.init_task): unexpected non-allocatable section.
> WARNING: vmlinux.o (.initcall6.init): unexpected non-allocatable section.
> WARNING: vmlinux.o (.initcall4.init): unexpected non-allocatable section.
> WARNING: vmlinux.o (.cpuinit.data): unexpected non-allocatable section.
> WARNING: vmlinux.o (.initcall2.init): unexpected non-allocatable section.
> WARNING: vmlinux.o (.con_initcall.init): unexpected non-allocatable section.
> WARNING: vmlinux.o (.initcall7.init): unexpected non-allocatable section.
> WARNING: vmlinux.o (.machine.desc): unexpected non-allocatable section.
> WARNING: vmlinux.o (.data.cacheline_aligned): unexpected non-allocatable section.
> WARNING: vmlinux.o (.initcallearly.init): unexpected non-allocatable section.
> WARNING: vmlinux.o (.initcall1.init): unexpected non-allocatable section.
> WARNING: vmlinux.o (.initcall5.init): unexpected non-allocatable section.
> WARNING: vmlinux.o (.ref.data): unexpected non-allocatable section.
> WARNING: vmlinux.o (.meminit.data): unexpected non-allocatable section.
> WARNING: vmlinux.o (.exitcall.exit): unexpected non-allocatable section.
> WARNING: vmlinux.o (.init.rodata): unexpected non-allocatable section.
> WARNING: vmlinux.o (.devinit.data): unexpected non-allocatable section.
> WARNING: vmlinux.o (.initcall0.init): unexpected non-allocatable section.
> WARNING: vmlinux.o (.initcall7s.init): unexpected non-allocatable section.
> WARNING: vmlinux.o (.sdata): unexpected non-allocatable section.

[Quoted in full for Sam's benefit]

What gcc, binutils versions and config ae you using?
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: unexpected non-allocatable section
  2009-05-03 10:45 ` Stephen Rothwell
@ 2009-05-03 16:39   ` Sean MacLennan
  2009-05-03 19:33     ` Wolfgang Denk
  0 siblings, 1 reply; 10+ messages in thread
From: Sean MacLennan @ 2009-05-03 16:39 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linuxppc-dev, Sam Ravnborg

On Sun, 3 May 2009 20:45:46 +1000
"Stephen Rothwell" <sfr@canb.auug.org.au> wrote:

> What gcc, binutils versions and config are you using?

gcc version 4.0.0 (DENX ELDK 4.1 4.0.0)
GNU assembler version 2.16.1 (powerpc-linux) using BFD version 2.16.1

And this is all running on the Warp with a 440EP.

Cheers,
   Sean

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: unexpected non-allocatable section
  2009-05-03 16:39   ` Sean MacLennan
@ 2009-05-03 19:33     ` Wolfgang Denk
  2009-05-03 20:07       ` Sam Ravnborg
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Denk @ 2009-05-03 19:33 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: Stephen Rothwell, Sam Ravnborg, linuxppc-dev

Dear Sean MacLennan,

In message <20090503123959.0cc5c967@lappy.seanm.ca> you wrote:
> 
> > What gcc, binutils versions and config are you using?
> 
> gcc version 4.0.0 (DENX ELDK 4.1 4.0.0)
> GNU assembler version 2.16.1 (powerpc-linux) using BFD version 2.16.1
> 
> And this is all running on the Warp with a 440EP.

Which exact commands did you use to build the kenrel, and how did you
set (and export?) the CROSS_COMPILE environment variable?

The thing is, that I cannot reproduce this - I tested it with
v2.6.30-rc4, both with ELDK 4.1 (as you) and ELDK 4.2.

Both build the kernel image without any such warnings.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
 The software required `Windows 95 or better', so I installed Linux.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: unexpected non-allocatable section
  2009-05-03 19:33     ` Wolfgang Denk
@ 2009-05-03 20:07       ` Sam Ravnborg
  2009-05-03 20:19         ` Wolfgang Denk
  2009-05-03 20:32         ` Sean MacLennan
  0 siblings, 2 replies; 10+ messages in thread
From: Sam Ravnborg @ 2009-05-03 20:07 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: linuxppc-dev, Stephen Rothwell, Sean MacLennan

On Sun, May 03, 2009 at 09:33:16PM +0200, Wolfgang Denk wrote:
> Dear Sean MacLennan,
> 
> In message <20090503123959.0cc5c967@lappy.seanm.ca> you wrote:
> > 
> > > What gcc, binutils versions and config are you using?
> > 
> > gcc version 4.0.0 (DENX ELDK 4.1 4.0.0)
> > GNU assembler version 2.16.1 (powerpc-linux) using BFD version 2.16.1
> > 
> > And this is all running on the Warp with a 440EP.
> 
> Which exact commands did you use to build the kenrel, and how did you
> set (and export?) the CROSS_COMPILE environment variable?
> 
> The thing is, that I cannot reproduce this - I tested it with
> v2.6.30-rc4, both with ELDK 4.1 (as you) and ELDK 4.2.
> 
> Both build the kernel image without any such warnings.

Anders already found the cause of this - it
was a missing endian conversion.
So you need to run this on a little endian target to
see it. And you need to do a full kernel build
so we run modpsot on vmlinux.

I will push the patch in a few minutes.

For reference it is below:

	Sam

From: Anders Kaseorg <andersk@MIT.EDU>
Subject: [PATCH] kbuild, modpost: fix unexpected non-allocatable section when cross compiling

The missing TO_NATIVE(sechdrs[i].sh_flags) was causing many
unexpected non-allocatable section warnings when cross-compiling
for an architecture with a different endianness.

Fix endianness of all the fields in the ELF header and
section headers, not just some of them so we are not
hit by this anohter time.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 936b6f8..a5c17db 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -384,11 +384,19 @@ static int parse_elf(struct elf_info *info, const char *filename)
 		return 0;
 	}
 	/* Fix endianness in ELF header */
-	hdr->e_shoff    = TO_NATIVE(hdr->e_shoff);
-	hdr->e_shstrndx = TO_NATIVE(hdr->e_shstrndx);
-	hdr->e_shnum    = TO_NATIVE(hdr->e_shnum);
-	hdr->e_machine  = TO_NATIVE(hdr->e_machine);
-	hdr->e_type     = TO_NATIVE(hdr->e_type);
+	hdr->e_type      = TO_NATIVE(hdr->e_type);
+	hdr->e_machine   = TO_NATIVE(hdr->e_machine);
+	hdr->e_version   = TO_NATIVE(hdr->e_version);
+	hdr->e_entry     = TO_NATIVE(hdr->e_entry);
+	hdr->e_phoff     = TO_NATIVE(hdr->e_phoff);
+	hdr->e_shoff     = TO_NATIVE(hdr->e_shoff);
+	hdr->e_flags     = TO_NATIVE(hdr->e_flags);
+	hdr->e_ehsize    = TO_NATIVE(hdr->e_ehsize);
+	hdr->e_phentsize = TO_NATIVE(hdr->e_phentsize);
+	hdr->e_phnum     = TO_NATIVE(hdr->e_phnum);
+	hdr->e_shentsize = TO_NATIVE(hdr->e_shentsize);
+	hdr->e_shnum     = TO_NATIVE(hdr->e_shnum);
+	hdr->e_shstrndx  = TO_NATIVE(hdr->e_shstrndx);
 	sechdrs = (void *)hdr + hdr->e_shoff;
 	info->sechdrs = sechdrs;
 
@@ -402,13 +410,16 @@ static int parse_elf(struct elf_info *info, const char *filename)
 
 	/* Fix endianness in section headers */
 	for (i = 0; i < hdr->e_shnum; i++) {
-		sechdrs[i].sh_type   = TO_NATIVE(sechdrs[i].sh_type);
-		sechdrs[i].sh_offset = TO_NATIVE(sechdrs[i].sh_offset);
-		sechdrs[i].sh_size   = TO_NATIVE(sechdrs[i].sh_size);
-		sechdrs[i].sh_link   = TO_NATIVE(sechdrs[i].sh_link);
-		sechdrs[i].sh_name   = TO_NATIVE(sechdrs[i].sh_name);
-		sechdrs[i].sh_info   = TO_NATIVE(sechdrs[i].sh_info);
-		sechdrs[i].sh_addr   = TO_NATIVE(sechdrs[i].sh_addr);
+		sechdrs[i].sh_name      = TO_NATIVE(sechdrs[i].sh_name);
+		sechdrs[i].sh_type      = TO_NATIVE(sechdrs[i].sh_type);
+		sechdrs[i].sh_flags     = TO_NATIVE(sechdrs[i].sh_flags);
+		sechdrs[i].sh_addr      = TO_NATIVE(sechdrs[i].sh_addr);
+		sechdrs[i].sh_offset    = TO_NATIVE(sechdrs[i].sh_offset);
+		sechdrs[i].sh_size      = TO_NATIVE(sechdrs[i].sh_size);
+		sechdrs[i].sh_link      = TO_NATIVE(sechdrs[i].sh_link);
+		sechdrs[i].sh_info      = TO_NATIVE(sechdrs[i].sh_info);
+		sechdrs[i].sh_addralign = TO_NATIVE(sechdrs[i].sh_addralign);
+		sechdrs[i].sh_entsize   = TO_NATIVE(sechdrs[i].sh_entsize);
 	}
 	/* Find symbol table. */
 	for (i = 1; i < hdr->e_shnum; i++) {

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: unexpected non-allocatable section
  2009-05-03 20:07       ` Sam Ravnborg
@ 2009-05-03 20:19         ` Wolfgang Denk
  2009-05-03 20:51           ` Sam Ravnborg
  2009-05-03 20:32         ` Sean MacLennan
  1 sibling, 1 reply; 10+ messages in thread
From: Wolfgang Denk @ 2009-05-03 20:19 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linuxppc-dev, Stephen Rothwell, Sean MacLennan

Dear Sam,

in message <20090503200701.GA32601@uranus.ravnborg.org> you wrote:
>
> > The thing is, that I cannot reproduce this - I tested it with
> > v2.6.30-rc4, both with ELDK 4.1 (as you) and ELDK 4.2.
> > 
> > Both build the kernel image without any such warnings.
> 
> Anders already found the cause of this - it
> was a missing endian conversion.
> So you need to run this on a little endian target to
> see it. And you need to do a full kernel build
> so we run modpsot on vmlinux.

On a little endian target? I guess you mean LE build host, because the
target (warp board = ppc44x) is definitely big endian?

I ran the tests on a LE machine:

Linux gemini.denx.de 2.6.27.15-170.2.24.fc10.i686 #1 SMP Wed Feb 11 23:58:12 EST 2009 i686 i686 i386 GNU/Linux

> I will push the patch in a few minutes.
> 
> For reference it is below:
> 
> 	Sam
> 
> From: Anders Kaseorg <andersk@MIT.EDU>
> Subject: [PATCH] kbuild, modpost: fix unexpected non-allocatable section when cross compiling
> 
> The missing TO_NATIVE(sechdrs[i].sh_flags) was causing many
> unexpected non-allocatable section warnings when cross-compiling
> for an architecture with a different endianness.

I'm confused. Why didn't I see this, then?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
People have one thing in common: they are all different.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: unexpected non-allocatable section
  2009-05-03 20:07       ` Sam Ravnborg
  2009-05-03 20:19         ` Wolfgang Denk
@ 2009-05-03 20:32         ` Sean MacLennan
  2009-05-03 20:51           ` Sam Ravnborg
  1 sibling, 1 reply; 10+ messages in thread
From: Sean MacLennan @ 2009-05-03 20:32 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Stephen Rothwell, Wolfgang Denk, linuxppc-dev

On Sun, 3 May 2009 22:07:01 +0200
"Sam Ravnborg" <sam@ravnborg.org> wrote:

> On Sun, May 03, 2009 at 09:33:16PM +0200, Wolfgang Denk wrote:

> > Which exact commands did you use to build the kenrel, and how did
> > you set (and export?) the CROSS_COMPILE environment variable?

export CROSS_COMPILE=ppc_4xxFP-
export ARCH=powerpc

The toolchain is in my path

> > The thing is, that I cannot reproduce this - I tested it with
> > v2.6.30-rc4, both with ELDK 4.1 (as you) and ELDK 4.2.
> > 
> > Both build the kernel image without any such warnings.
> 
> Anders already found the cause of this - it
> was a missing endian conversion.
> So you need to run this on a little endian target to
> see it. And you need to do a full kernel build
> so we run modpsot on vmlinux.
> 
> I will push the patch in a few minutes.

That patch gets rid of the warnings.

Cheers,
   Sean

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: unexpected non-allocatable section
  2009-05-03 20:19         ` Wolfgang Denk
@ 2009-05-03 20:51           ` Sam Ravnborg
  0 siblings, 0 replies; 10+ messages in thread
From: Sam Ravnborg @ 2009-05-03 20:51 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: linuxppc-dev, Stephen Rothwell, Sean MacLennan

> I ran the tests on a LE machine:
> 
> Linux gemini.denx.de 2.6.27.15-170.2.24.fc10.i686 #1 SMP Wed Feb 11 23:58:12 EST 2009 i686 i686 i386 GNU/Linux
> 
> > I will push the patch in a few minutes.
> > 
> > For reference it is below:
> > 
> > 	Sam
> > 
> > From: Anders Kaseorg <andersk@MIT.EDU>
> > Subject: [PATCH] kbuild, modpost: fix unexpected non-allocatable section when cross compiling
> > 
> > The missing TO_NATIVE(sechdrs[i].sh_flags) was causing many
> > unexpected non-allocatable section warnings when cross-compiling
> > for an architecture with a different endianness.
> 
> I'm confused. Why didn't I see this, then?

Maybe they just scrolled past the screen first time?
You need to do "rm vmlinux.o" to reproduce it.

The warnings are shown when we do section mismatch analysis on vmlinux.o
which is part of the final steps in creating vmlinux.
But you will force the check again if you only delete vmlinux.

You need to delete vmlinux.o to see them.

I hope this is the explanation - otherwise I have no good idea.

	Sam

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: unexpected non-allocatable section
  2009-05-03 20:32         ` Sean MacLennan
@ 2009-05-03 20:51           ` Sam Ravnborg
  0 siblings, 0 replies; 10+ messages in thread
From: Sam Ravnborg @ 2009-05-03 20:51 UTC (permalink / raw)
  To: Sean MacLennan; +Cc: Stephen Rothwell, Wolfgang Denk, linuxppc-dev

On Sun, May 03, 2009 at 04:32:41PM -0400, Sean MacLennan wrote:
> On Sun, 3 May 2009 22:07:01 +0200
> "Sam Ravnborg" <sam@ravnborg.org> wrote:
> 
> > On Sun, May 03, 2009 at 09:33:16PM +0200, Wolfgang Denk wrote:
> 
> > > Which exact commands did you use to build the kenrel, and how did
> > > you set (and export?) the CROSS_COMPILE environment variable?
> 
> export CROSS_COMPILE=ppc_4xxFP-
> export ARCH=powerpc
> 
> The toolchain is in my path
> 
> > > The thing is, that I cannot reproduce this - I tested it with
> > > v2.6.30-rc4, both with ELDK 4.1 (as you) and ELDK 4.2.
> > > 
> > > Both build the kernel image without any such warnings.
> > 
> > Anders already found the cause of this - it
> > was a missing endian conversion.
> > So you need to run this on a little endian target to
> > see it. And you need to do a full kernel build
> > so we run modpsot on vmlinux.
> > 
> > I will push the patch in a few minutes.
> 
> That patch gets rid of the warnings.

Thanks for the quick testing. I will add a "Tested-by: if I rebase the tree.

	Sam

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-05-03 20:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-03  2:41 unexpected non-allocatable section Sean MacLennan
2009-05-03  7:04 ` Sean MacLennan
2009-05-03 10:45 ` Stephen Rothwell
2009-05-03 16:39   ` Sean MacLennan
2009-05-03 19:33     ` Wolfgang Denk
2009-05-03 20:07       ` Sam Ravnborg
2009-05-03 20:19         ` Wolfgang Denk
2009-05-03 20:51           ` Sam Ravnborg
2009-05-03 20:32         ` Sean MacLennan
2009-05-03 20:51           ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).