From: John David Anglin <dave.anglin@bell.net>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
Sebastian Wankerl <sisewank@cip.cs.fau.de>,
linux-kernel@vger.kernel.org,
Philip Kranz <philip.kranz@googlemail.com>,
i4passt@lists.informatik.uni-erlangen.de,
linux-parisc@vger.kernel.org, corbet@lwn.net
Subject: Re: [PATCH] Add non-zero module sections to sysfs
Date: Sat, 6 Apr 2013 11:16:19 -0400 [thread overview]
Message-ID: <BLU0-SMTP23C8D54498C7DFACDF083B97DB0@phx.gbl> (raw)
In-Reply-To: <1365245524.4298.14.camel@dabdike.spectrum.wifi>
On 6-Apr-13, at 6:52 AM, James Bottomley wrote:
> On Sat, 2013-04-06 at 15:22 +1030, Rusty Russell wrote:
>>> The problem is our assumption that section names be unique. This
>>> assumption is wrong. The ELF spec says (version 1.1 page 1-15): "An
>>> object file may have more than one section with the same name."
>>> We need
>>> to fix the kernel not to rely on a bogus assumption ... but we had
>>> no
>>> idea how to do that in a way that preserved the backwards
>>> compatibility
>>> of sections subdirectory.
>>>
>>> I admit that 35dead4235e2b67da7275b4122fed37099c2f462 is a hack,
>>> but now
>>> the problem has got attention, can we fix it properly?
>>
>> Yep. The original patch didn't go through me, or we would have had
>> this
>> discussion back then...
>>
>> The use of section names in sysfs goes back to one Mr. Corbet. Why
>> did
>> he do it that way? Because gdb's add-symbol-file makes the same
>> assumption. So if we fixed the sysfs somehow, it still wouldn't be
>> useful, since there's no way to tell gdb :(
>>
>> The real answer don't use -ffunction-sections on modules: probably
>> not
>> as important as the rest of the kernel. And the new shiny is
>> -flto anyway.
>>
>> And that leaves us with a PA-RISC specific issue, for which we should
>> move the fix to PA-RISC.
>>
>> Thoughts?
>
> Well, we don't have much of a choice. Our ELF stub jump on 32 bits
> is a
> PCREL17. That means once a module size is over 128k there's a
> chance we
> might not be able to link it because the jump is too big for the
> instruction. IPV6 is one such big module today, but I'm sure there
> are
> others. The only way I know to fix this is to allow the linker to
> insert stubs between functions, so we only fail at linking if a single
> function is >128k big. The way to do this is -ffunction-sections,
> unless there's something else we could do (all we really need is a way
> to ensure we can insert ELF stubs every 128k).
There is now a config work around for this. See:
http://www.spinics.net/lists/linux-parisc/msg04521.html
Dave
--
John David Anglin dave.anglin@bell.net
next prev parent reply other threads:[~2013-04-06 15:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1364994499-23708-1-git-send-email-sisewank@cip.cs.fau.de>
[not found] ` <87mwtf3ya1.fsf@rustcorp.com.au>
[not found] ` <515D4A7F.5070102@cip.cs.fau.de>
2013-04-05 4:00 ` [PATCH] Add non-zero module sections to sysfs Rusty Russell
2013-04-05 9:40 ` Sebastian Wankerl
2013-04-05 10:07 ` James Bottomley
2013-04-06 4:52 ` Rusty Russell
2013-04-06 10:52 ` James Bottomley
2013-04-06 15:16 ` John David Anglin [this message]
2013-04-07 1:22 ` James Bottomley
2013-04-07 1:45 ` John David Anglin
2013-04-06 10:40 ` Philip Kranz
2013-04-08 4:14 ` Rusty Russell
2013-04-08 11:55 ` Philip Kranz
2013-04-11 14:11 ` Philip Kranz
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=BLU0-SMTP23C8D54498C7DFACDF083B97DB0@phx.gbl \
--to=dave.anglin@bell.net \
--cc=James.Bottomley@HansenPartnership.com \
--cc=corbet@lwn.net \
--cc=i4passt@lists.informatik.uni-erlangen.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=philip.kranz@googlemail.com \
--cc=rusty@rustcorp.com.au \
--cc=sisewank@cip.cs.fau.de \
/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