From: Jakub Jelinek <jakub@redhat.com>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de>,
arnd@bergmann-dalldorf.de,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: s390x build warnings from <linux/module.h>
Date: Tue, 15 Oct 2002 14:19:48 -0400 [thread overview]
Message-ID: <20021015141948.V5659@devserv.devel.redhat.com> (raw)
In-Reply-To: <OF83D5DB36.D1321FFF-ONC1256C53.005AFE6B@de.ibm.com>; from schwidefsky@de.ibm.com on Tue, Oct 15, 2002 at 06:50:12PM +0200
On Tue, Oct 15, 2002 at 06:50:12PM +0200, Martin Schwidefsky wrote:
>
> >> during 'make modules' on s390x, I see lots of warnings about 'ignoring
> >> changed section attributes for __ksymtab' that I have found to be the
> >> result of changeset 1.373.196.1, where Kai changed the defaults for
> module
> >> exports to 'no symbols exported'.
> >>
> >> The problem is that there is a section '__ksymtab,"a"', while s390x
> >> requires it to be '__ksymtab,"aw"' because modules must be compiled with
> >> '-fpic' here, unlike afaics all the other architectures.
> >
> >Hmmh, there's a couple of things I don't understand, though they're most
> >likely there for a reason. First of all, why do you need -fpic at all?
> >kernel modules are not shared, they should get properly relocated when
> >insmod'ing them, so I don't see why you're doing that.
>
> The reason for -fpic for module code lies in the compiler. To improve the
> code we use the brasl and larl instructions for function calling and
> addressing data. Unluckily these two instructions have a limited range
> of +-4GB. For user space programs that means that a single shared object
> may not be bigger than 4GB and that no non-fpic code is linked into
> shared objects. With these two restrictions we are able to generate
> much better code. There is one small problem though: kernel modules.
> They get loaded into the vmalloc area which is located AFTER the main
> memory. A machine with more than 4 GB of main memory therefore can't
> load modules anymore because the calls and references to kernel structure
> can't span the distance between vmalloc area and kernel image. To get
> around this problem we compile kernel modules with -fpic and make the
> modutils create plt stubs and got entries. Easy ?
Is there any reason why you cannot implement module_map and module_unmap
on s390x like sparc64 or x86-64 does?
I don't think we'll have size of kernel + size of all modules approaching
2 or 4GB size any time soon on any architecture.
Jakub
next prev parent reply other threads:[~2002-10-15 18:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-15 16:50 Martin Schwidefsky
2002-10-15 18:19 ` Jakub Jelinek [this message]
2002-10-15 18:28 ` Kai Germaschewski
2002-10-15 17:36 Arnd Bergmann
2002-10-15 15:59 ` Kai Germaschewski
2002-10-15 20:46 Ulrich Weigand
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=20021015141948.V5659@devserv.devel.redhat.com \
--to=jakub@redhat.com \
--cc=arnd@bergmann-dalldorf.de \
--cc=kai@tp1.ruhr-uni-bochum.de \
--cc=linux-kernel@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
/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
all inboxes | Powered by JetHome®