public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Miles Bader <miles@gnu.org>
Cc: linux-kernel@vger.kernel.org, rth@twiddle.net
Subject: Re: [PATCH] Embed __this_module in module itself.
Date: Wed, 08 Jan 2003 22:51:24 +1100	[thread overview]
Message-ID: <20030110073328.A53D02C0DF@lists.samba.org> (raw)
In-Reply-To: Your message of "07 Jan 2003 14:36:54 +0900." <buoadid1pxl.fsf@mcspd15.ucom.lsi.nec.co.jp>

In message <buoadid1pxl.fsf@mcspd15.ucom.lsi.nec.co.jp> you write:
> Miles Bader <miles@lsi.nec.co.jp> writes:
> > When I try to build modules using 2.5.54, the resulting .ko files lack
> > the .gnu.linkonce.* sections, which causes the kernel module loader to
> > fail on them -- those sections _are_ present in the .o files, but the
> > linker apparently removes them!
> 
> Ok, I found out why this is happening -- the v850 default linker
> scripts, for whatever reason, merge any section called `.gnu.linker.t*'
> with .text.

That's about as wierdass as it comes.

> I can prevent this by adding the option `--unique=.gnu.linkonce.this_module'
> to the linker flags (specifically, to LDFLAGS_MODULE in the top-level
> Makefile).  I suppose another way to do it would be to rename the
> section something that doesn't match `.gnu.linker.t*'.

Or you could add this flag in arch/v850/Makefile.

> What's the right way to handle this?
> 
> [from perusing the ld srcs, a few other archs seem to have the same
> `feature,' though the only that I think has linux support is `cris']

I think:
	LDFLAGS_MODULE += -T arch/v850/module.lds

And include a linker script there which works.

Thanks for finding this...
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

  reply	other threads:[~2003-01-10  7:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-27 10:25 [PATCH] Embed __this_module in module itself Rusty Russell
2003-01-06 11:03 ` Miles Bader
2003-01-07  5:36   ` Miles Bader
2003-01-08 11:51     ` Rusty Russell [this message]
2003-01-08 20:56     ` Sam Ravnborg
2003-01-09  1:18       ` Miles Bader
2003-01-09 18:49         ` Sam Ravnborg
2003-01-09 19:16           ` Richard B. Johnson
  -- strict thread matches above, loose matches on Subject: below --
2002-12-23  8:38 Rusty Russell
2002-12-23  9:21 ` David S. Miller

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=20030110073328.A53D02C0DF@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miles@gnu.org \
    --cc=rth@twiddle.net \
    /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