* "do section mismatch check on full vmlinux" breaks powerpc build
@ 2007-07-24 22:41 Nathan Lynch
2007-07-25 7:57 ` Sam Ravnborg
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Nathan Lynch @ 2007-07-24 22:41 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: linuxppc-dev
Hello-
2.6.23-rc1 breaks the build for 64-bit powerpc for me (using
maple_defconfig):
LD vmlinux.o
powerpc64-unknown-linux-gnu-ld: dynreloc miscount for
kernel/built-in.o, section .opd
powerpc64-unknown-linux-gnu-ld: can not edit opd Bad value
make: *** [vmlinux.o] Error 1
This is on a i386 host with:
powerpc64-unknown-linux-gnu-gcc (GCC) 4.1.2
GNU ld version 2.16.1
Reverting the following commit fixes it:
commit 741f98fe298a73c9d47ed53703c1279a29718581
Author: Sam Ravnborg <sam@ravnborg.org>
Date: Tue Jul 17 10:54:06 2007 +0200
kbuild: do section mismatch check on full vmlinux
However, I see a possibly related binutils patch:
http://article.gmane.org/gmane.comp.gnu.binutils/33650
Will there be a kbuild fix for this or should I update my binutils?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: "do section mismatch check on full vmlinux" breaks powerpc build
2007-07-24 22:41 "do section mismatch check on full vmlinux" breaks powerpc build Nathan Lynch
@ 2007-07-25 7:57 ` Sam Ravnborg
2007-07-25 9:50 ` Sam Ravnborg
2007-07-25 11:43 ` Sam Ravnborg
2 siblings, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2007-07-25 7:57 UTC (permalink / raw)
To: Nathan Lynch; +Cc: linuxppc-dev
On Tue, Jul 24, 2007 at 05:41:05PM -0500, Nathan Lynch wrote:
> Hello-
>
> 2.6.23-rc1 breaks the build for 64-bit powerpc for me (using
> maple_defconfig):
>
> LD vmlinux.o
> powerpc64-unknown-linux-gnu-ld: dynreloc miscount for
> kernel/built-in.o, section .opd
> powerpc64-unknown-linux-gnu-ld: can not edit opd Bad value
> make: *** [vmlinux.o] Error 1
>
> This is on a i386 host with:
> powerpc64-unknown-linux-gnu-gcc (GCC) 4.1.2
> GNU ld version 2.16.1
>
> Reverting the following commit fixes it:
>
> commit 741f98fe298a73c9d47ed53703c1279a29718581
> Author: Sam Ravnborg <sam@ravnborg.org>
> Date: Tue Jul 17 10:54:06 2007 +0200
>
> kbuild: do section mismatch check on full vmlinux
>
>
> However, I see a possibly related binutils patch:
> http://article.gmane.org/gmane.comp.gnu.binutils/33650
>
> Will there be a kbuild fix for this or should I update my binutils?
>
What kbuild does is a very basic link of a number of .o files.
Why this suddenly breaks I do not fully understand and I see no obvious
way to fix it in kbuild.
And browsing arch/ppc/kernel/vmlinux.lds.S I see no special handling of .opd.
Puzzeled?
I'm not sure how to deal with this one. Would prefer to say that this is
a binutils bug so fix it there but then I like to provide a workaround
for those with faulty toolchains.
I could put the link and the additional modpost check inside a
CONFIG_SOMETHING....
Sam
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: "do section mismatch check on full vmlinux" breaks powerpc build
2007-07-24 22:41 "do section mismatch check on full vmlinux" breaks powerpc build Nathan Lynch
2007-07-25 7:57 ` Sam Ravnborg
@ 2007-07-25 9:50 ` Sam Ravnborg
2007-07-25 11:43 ` Sam Ravnborg
2 siblings, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2007-07-25 9:50 UTC (permalink / raw)
To: Nathan Lynch; +Cc: linuxppc-dev
On Tue, Jul 24, 2007 at 05:41:05PM -0500, Nathan Lynch wrote:
> Hello-
>
> 2.6.23-rc1 breaks the build for 64-bit powerpc for me (using
> maple_defconfig):
>
> LD vmlinux.o
> powerpc64-unknown-linux-gnu-ld: dynreloc miscount for
> kernel/built-in.o, section .opd
> powerpc64-unknown-linux-gnu-ld: can not edit opd Bad value
> make: *** [vmlinux.o] Error 1
>
> This is on a i386 host with:
> powerpc64-unknown-linux-gnu-gcc (GCC) 4.1.2
> GNU ld version 2.16.1
>
> Reverting the following commit fixes it:
>
> commit 741f98fe298a73c9d47ed53703c1279a29718581
> Author: Sam Ravnborg <sam@ravnborg.org>
> Date: Tue Jul 17 10:54:06 2007 +0200
>
> kbuild: do section mismatch check on full vmlinux
>
>
> However, I see a possibly related binutils patch:
> http://article.gmane.org/gmane.comp.gnu.binutils/33650
>
> Will there be a kbuild fix for this or should I update my binutils?
Did a bit more testing.
Im am down to the following to reproduce the fault:
/opt/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc64-unknown-linux-gnu/bin/powerpc64-unknown-linux-gnu-ld -m elf64ppc -r -o vmlinux.o kernel/signal.o arch/powerpc/kernel/vdso.o
Seems that vdso.o and signal.o does not like each other??
Sam
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: "do section mismatch check on full vmlinux" breaks powerpc build
2007-07-24 22:41 "do section mismatch check on full vmlinux" breaks powerpc build Nathan Lynch
2007-07-25 7:57 ` Sam Ravnborg
2007-07-25 9:50 ` Sam Ravnborg
@ 2007-07-25 11:43 ` Sam Ravnborg
2007-07-25 21:16 ` Nathan Lynch
2 siblings, 1 reply; 6+ messages in thread
From: Sam Ravnborg @ 2007-07-25 11:43 UTC (permalink / raw)
To: Nathan Lynch; +Cc: linuxppc-dev
On Tue, Jul 24, 2007 at 05:41:05PM -0500, Nathan Lynch wrote:
> Hello-
>
> 2.6.23-rc1 breaks the build for 64-bit powerpc for me (using
> maple_defconfig):
>
> LD vmlinux.o
> powerpc64-unknown-linux-gnu-ld: dynreloc miscount for
> kernel/built-in.o, section .opd
> powerpc64-unknown-linux-gnu-ld: can not edit opd Bad value
> make: *** [vmlinux.o] Error 1
>
> This is on a i386 host with:
> powerpc64-unknown-linux-gnu-gcc (GCC) 4.1.2
> GNU ld version 2.16.1
>
> Reverting the following commit fixes it:
>
> commit 741f98fe298a73c9d47ed53703c1279a29718581
> Author: Sam Ravnborg <sam@ravnborg.org>
> Date: Tue Jul 17 10:54:06 2007 +0200
>
> kbuild: do section mismatch check on full vmlinux
>
>
> However, I see a possibly related binutils patch:
> http://article.gmane.org/gmane.comp.gnu.binutils/33650
>
> Will there be a kbuild fix for this or should I update my binutils?
I tried searching a bit more to find the culprint.
I narrowed it down to the following change to avoid the breakage:
diff --git a/include/linux/mm.h b/include/linux/mm.h
index c456c3a..2ea222f 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1246,7 +1246,7 @@ void drop_slab(void);
extern int randomize_va_space;
#endif
-__attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma);
+//__attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma);
#endif /* __KERNEL__ */
#endif /* _LINUX_MM_H */
So seems that something goes a bit fishy when using weak symbols and this trigges
a binutils bug.
The above line was introdused in the following commit:
commit f269fdd1829acc5e53bf57b145003e5733133f2b
Author: David Howells <dhowells@redhat.com>
Date: Wed Sep 27 01:50:23 2006 -0700
[PATCH] NOMMU: move the fallback arch_vma_name() to a sensible place
Move the fallback arch_vma_name() to a sensible place (kernel/signal.c).
Currently it's in fs/proc/task_mmu.c, a file that is dependent on both
CONFIG_PROC_FS and CONFIG_MMU being enabled, but it's used from
kernel/signal.c from where it is called unconditionally.
[akpm@osdl.org: build fix]
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Sam
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: "do section mismatch check on full vmlinux" breaks powerpc build
2007-07-25 11:43 ` Sam Ravnborg
@ 2007-07-25 21:16 ` Nathan Lynch
2007-07-25 21:33 ` Sam Ravnborg
0 siblings, 1 reply; 6+ messages in thread
From: Nathan Lynch @ 2007-07-25 21:16 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: linuxppc-dev
Hi Sam-
Sam Ravnborg wrote:
> On Tue, Jul 24, 2007 at 05:41:05PM -0500, Nathan Lynch wrote:
> >
> > 2.6.23-rc1 breaks the build for 64-bit powerpc for me (using
> > maple_defconfig):
> >
> > LD vmlinux.o
> > powerpc64-unknown-linux-gnu-ld: dynreloc miscount for
> > kernel/built-in.o, section .opd
> > powerpc64-unknown-linux-gnu-ld: can not edit opd Bad value
> > make: *** [vmlinux.o] Error 1
> >
>
> I narrowed it down to the following change to avoid the breakage:
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index c456c3a..2ea222f 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -1246,7 +1246,7 @@ void drop_slab(void);
> extern int randomize_va_space;
> #endif
>
> -__attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma);
> +//__attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma);
>
> #endif /* __KERNEL__ */
> #endif /* _LINUX_MM_H */
>
> So seems that something goes a bit fishy when using weak symbols and this trigges
> a binutils bug.
>
> The above line was introdused in the following commit:
>
> commit f269fdd1829acc5e53bf57b145003e5733133f2b
> Author: David Howells <dhowells@redhat.com>
> Date: Wed Sep 27 01:50:23 2006 -0700
>
> [PATCH] NOMMU: move the fallback arch_vma_name() to a sensible place
Thanks for looking into this. Removing the "__attribute__((weak))"
from arch_vma_name's declaration in linux/mm.h unbreaks the build for
me.
Maybe it shouldn't matter, but it seems unusual to have the weak
attribute specified at the function's declaration. I wasn't able to
find any examples of that for other weak functions in the kernel
(e.g. sched_clock).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: "do section mismatch check on full vmlinux" breaks powerpc build
2007-07-25 21:16 ` Nathan Lynch
@ 2007-07-25 21:33 ` Sam Ravnborg
0 siblings, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2007-07-25 21:33 UTC (permalink / raw)
To: Nathan Lynch; +Cc: linuxppc-dev
On Wed, Jul 25, 2007 at 04:16:10PM -0500, Nathan Lynch wrote:
> Hi Sam-
>
> Sam Ravnborg wrote:
> > On Tue, Jul 24, 2007 at 05:41:05PM -0500, Nathan Lynch wrote:
> > >
> > > 2.6.23-rc1 breaks the build for 64-bit powerpc for me (using
> > > maple_defconfig):
> > >
> > > LD vmlinux.o
> > > powerpc64-unknown-linux-gnu-ld: dynreloc miscount for
> > > kernel/built-in.o, section .opd
> > > powerpc64-unknown-linux-gnu-ld: can not edit opd Bad value
> > > make: *** [vmlinux.o] Error 1
> > >
> >
> > I narrowed it down to the following change to avoid the breakage:
> >
> > diff --git a/include/linux/mm.h b/include/linux/mm.h
> > index c456c3a..2ea222f 100644
> > --- a/include/linux/mm.h
> > +++ b/include/linux/mm.h
> > @@ -1246,7 +1246,7 @@ void drop_slab(void);
> > extern int randomize_va_space;
> > #endif
> >
> > -__attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma);
> > +//__attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma);
> >
> > #endif /* __KERNEL__ */
> > #endif /* _LINUX_MM_H */
> >
> > So seems that something goes a bit fishy when using weak symbols and this trigges
> > a binutils bug.
> >
> > The above line was introdused in the following commit:
> >
> > commit f269fdd1829acc5e53bf57b145003e5733133f2b
> > Author: David Howells <dhowells@redhat.com>
> > Date: Wed Sep 27 01:50:23 2006 -0700
> >
> > [PATCH] NOMMU: move the fallback arch_vma_name() to a sensible place
>
>
> Thanks for looking into this. Removing the "__attribute__((weak))"
> from arch_vma_name's declaration in linux/mm.h unbreaks the build for
> me.
>
> Maybe it shouldn't matter, but it seems unusual to have the weak
> attribute specified at the function's declaration. I wasn't able to
> find any examples of that for other weak functions in the kernel
> (e.g. sched_clock).
Unfortunately removing the weak attribute uncovered that x86_64 has
two functions with the same name => link error.
Needs to have that sorted first out but ball is rolling.
(Se lkml for details)
Sam
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-07-25 21:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-24 22:41 "do section mismatch check on full vmlinux" breaks powerpc build Nathan Lynch
2007-07-25 7:57 ` Sam Ravnborg
2007-07-25 9:50 ` Sam Ravnborg
2007-07-25 11:43 ` Sam Ravnborg
2007-07-25 21:16 ` Nathan Lynch
2007-07-25 21:33 ` 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).