insmod problem on ARM with more than 16MB of RAM?
Russell King - ARM Linux
linux at arm.linux.org.uk
Thu Dec 22 15:45:15 EST 2011
On Thu, Dec 22, 2011 at 04:49:13PM +0000, Catalin Marinas wrote:
> A completely generic solution would be to modify the module loader to
> cope with longer relocations by setting up some trampoline code.
That was discussed when the module format changed, and decided it was
not possible because of circular dependencies to do it right.
The reason is you can't modify the size of the allocation after the
module has been loaded to add trampolines, and you can't parse the
object file until memory has been allocated to load it into. So you
either have to allocate a trampoline for every function symbol in the
kernel which the module _might_ use (which wastes lots of memory) or
you just arrange for stuff to be placed within range of the kernel.
So for MMU platforms, we just ensure that modules are always placed
within reach of the kernel text. For nommu platforms, modules are
a bitch - and TBH given the virtually non-existent activity/interest
from the nommu sector, it's something I'm willing to spend the grand
total of zero time to solve this _really_ _hard_ problem.
More information about the linux-arm-kernel