linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonas Bonn <jonas@southpole.se>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: rusty@rustcorp.com.au, arnd@arndb.de, geert@linux-m68k.org,
	mingo@elte.hu, linux-kernel@vger.kernel.org,
	linux-arch@vger.kernel.org, monstr@monstr.eu,
	cmetcalf@tilera.com, akpm@linux-foundation.org
Subject: Re: [PATCH 1/2] modules: add default loader hook implementations
Date: Fri, 01 Jul 2011 07:00:33 +0200	[thread overview]
Message-ID: <1309496433.24186.25.camel@localhost> (raw)
In-Reply-To: <BANLkTim3k+eRZHnpWLVHe0Q9SoU9w4zm=A@mail.gmail.com>


On Thu, 2011-06-30 at 13:02 -0700, Linus Torvalds wrote:
> On Thu, Jun 30, 2011 at 12:22 PM, Jonas Bonn <jonas@southpole.se> wrote:
> >
> > The module loader code allows architectures to hook into the code by
> > providing a small number of entry points that each arch must implement.
> > This patch provides __weakly linked generic implementations of these
> > entry points for architectures that don't need to do anything special.
> 
> Hmm. I know we used to have problems with gcc versions (or maybe
> binutils) that had bugs wrt "weak" functions being declared in the
> same compilation unit they were used. They would either inline the
> weak function, or bind it early, and never let the linker see the
> weak/strong functions and do the right thing.
> 
> I just don't remember if we disallowed those gcc/binutils versions and
> check for it, or whether we decided that __weak function smust be
> defined in a compilation unit separate from the user.
> 
> Because you now added all the weak functions to the same file
> (module.c) that actually uses them.

There was precedent for this.  The function arch_mod_section_prepend was
already defined as __weak in kernel/module.c.

And just looking around the kernel tree, there are lots of other files
that have their weak variants in the same file as the functions that
rely on them.  'git grep __weak' turns up a whole slew of them.

/Jonas

  reply	other threads:[~2011-07-01  5:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-25  7:38 [PATCH] modules: add default loader hook implementations Jonas Bonn
2011-06-25 10:04 ` Ingo Molnar
2011-06-25 10:04   ` Ingo Molnar
2011-06-25 10:39   ` Jonas Bonn
2011-06-25 13:08     ` Arnd Bergmann
2011-06-27  9:07       ` Rusty Russell
2011-06-27  9:25         ` Geert Uytterhoeven
2011-06-27 11:05           ` Arnd Bergmann
2011-06-28  1:23             ` Rusty Russell
2011-06-28 10:45               ` Arnd Bergmann
2011-06-28 10:45                 ` Arnd Bergmann
2011-06-28 16:50                 ` Jonas Bonn
2011-06-28 16:50                   ` Jonas Bonn
2011-06-30 19:22                 ` [PATCH 1/2] " Jonas Bonn
2011-06-30 19:22                   ` [PATCH 2/2] modules: make arch's use default loader hooks Jonas Bonn
2011-06-30 19:22                     ` Jonas Bonn
2011-06-30 19:46                     ` Mike Frysinger
2011-07-01  7:00                     ` Geert Uytterhoeven
2011-07-05 11:25                     ` Michal Simek
2011-07-05 11:25                       ` Michal Simek
2011-06-30 19:43                   ` [PATCH 1/2] modules: add default loader hook implementations Mike Frysinger
2011-06-30 20:02                   ` Linus Torvalds
2011-07-01  5:00                     ` Jonas Bonn [this message]
2011-07-04  4:34                       ` Rusty Russell

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=1309496433.24186.25.camel@localhost \
    --to=jonas@southpole.se \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=cmetcalf@tilera.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=monstr@monstr.eu \
    --cc=rusty@rustcorp.com.au \
    --cc=torvalds@linux-foundation.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 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).