| Age | Commit message (Collapse) | Author |
|
When creating the final layout of a kernel module in memory, allow the
module loader to reserve some additional memory in front of a given section.
This is currently only needed for the parisc port which needs to put the
stub entries there to fulfill the 17/22bit PCREL relocations with large
kernel modules like xfs.
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (renamed fn)
|
|
From: Rusty Russell <rusty@rustcorp.com.au>, David Mosberger
The patch below updates the other platforms with module_arch_cleanup().
Also, I added more debug output to kernel/module.c since I found it useful
to be able to see the final section layout.
|
|
|
|
The declaration of `module_frob_arch_sections' in moduleloader.h (and
the definitions in most of the module.c files) are inconsistent with the
definition in the PPC's module.c -- in the latter the first two
arguments are not declared `const', whereas everyplace else they are.
PS. secstrings can be modded to: if an arch can't handle discarding
init, it simply renames the .init sections.
|
|
RTH's final complaint (so far 8) was that we should sort the module
sections: archs might require some sections to be adjacent, so they can
all be reached by a relative pointer (ie. GOT pointer). This
implements that reordering, and simplfies the module interface for
architectures as well.
Previously an arch could specify it wanted extra space, but not where
that space would be. The new method (used only by PPC so far) is to
allocate an empty section (in asm/module.h or by setting LDFLAGS_MODULE
to use an arch specific linker script), and expand that to the desired
size in "module_frob_arch_sections()".
|
|
Sparc64 (and probably others) need all the kernel symbols within
32-bits, which includes the manufactured "__this_module" which refers
to the struct module *.
This changes the interface back to its old style: the arch-specific code
manipulates the init and core sizes, and we call module_alloc() ourselves.
|
|
Separates the module loading function prototypes (and elf.h) into
moduleloader.h. AT_GID in elf.h clashes with xfs.h, but this also
makes module.h less cluttered.
|