lkml.org 
[lkml]   [2011]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: ARM: relocation out of range (when loading a module)
On Wed, Jan 12, 2011 at 01:28:23PM -0500, Nicolas Pitre wrote:
> If we really needed to do such thing, that would be even better to
> simply have the kernel create those indirect veneers dynamically. And
> in fact, Russell had that working and he posted the corresponding patch
> many years ago, but the module placement was made so that the indirect
> branches were unnecessary.

Actually, it's something we used to do in 2.2 days when modules were
prepared and linked in userspace before being uploaded into kernel
space. This allowed the module to be inteligently linked - so the
indirect branches were created only when they were necessary.

When the new kernel-based module linker happened, this presented a
chicken and egg problem with that approach, which give us a choice:
either place the module within range of the kernel text and guarantee
that the kernel text is reachable, or _always_ indirect every module
branch through a jump table even if it was reachable from where the
module was placed.

The decision was made to go with the former, so the latter never got
implemented.

Then came along the embedded initrd/initramfs idea which rather buggered
the scheme when large initramfs are embedded into the image.

As the overall feeling at the time was "don't use large initrds" it's
something I've never really cared about - and I'm still of the opinion
that 16MB of compressed initrd/initramfs is rather silly.


\
 
 \ /
  Last update: 2011-01-12 19:47    [W:0.136 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site