From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: MMUless Core: Fix insmod error - module relocation out of range
Date: Wed, 3 Oct 2012 10:48:02 +0100 [thread overview]
Message-ID: <20121003094801.GG6933@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAHkRjk5gLSWG0uiSAK9wnLDi19bEPMpFAFfbqXjz6xNH1W4HXw@mail.gmail.com>
On Wed, Oct 03, 2012 at 10:25:09AM +0100, Catalin Marinas wrote:
> On 3 October 2012 04:43, Pratyush Anand <pratyush.anand@st.com> wrote:
> > From: Neha MAKHIJA <neha.makhija-ext@st.com>
> >
> > ARM supports 32Mb jump. Hence branch instruction has a limited range.
> >
> > For MMU systems, the module area is located just before the kernel memory
> > because this allows function calls to be linked directly without any indirect
> > branches.
> >
> > In case of MMU-less system, Module area is given whole of the DDR address
> > space. Since, module_alloc() calls vmalloc(), the module area goes outside the
> > allowed jump range. Due to this insmod will not be able to load the modules
> > giving out of range relocation errors.
> >
> > Solution - Add the mlong-calls flags while compiling the modules. This tells
> > the compiler to perform function calls by first loading the address of the
> > function and then performing a subroutine function call on this register.
>
> Do we need the module loader to handle additional relocations or they
> are all already handled?
I have explained this extensively when the 2.6 module loader came into
being. It's not about additional relocations, it's about the addressible
range of the 'b' instruction.
Please search the archives for the explanation.
next prev parent reply other threads:[~2012-10-03 9:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-03 3:43 [PATCH] ARM: MMUless Core: Fix insmod error - module relocation out of range Pratyush Anand
2012-10-03 9:25 ` Catalin Marinas
2012-10-03 9:48 ` Russell King - ARM Linux [this message]
2012-10-03 10:02 ` Catalin Marinas
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=20121003094801.GG6933@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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