All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Lynch <ntl@pobox.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: "do section mismatch check on full vmlinux" breaks powerpc build
Date: Wed, 25 Jul 2007 16:16:10 -0500	[thread overview]
Message-ID: <20070725211610.GJ951@localdomain> (raw)
In-Reply-To: <20070725114356.GB25580@uranus.ravnborg.org>

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).

  reply	other threads:[~2007-07-25 21:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2007-07-25 21:33     ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070725211610.GJ951@localdomain \
    --to=ntl@pobox.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.