Messages in this thread | | | Subject | Re: [PATCH 14/19] OpenRISC: Module support | From | Jonas Bonn <> | Date | Fri, 24 Jun 2011 10:52:05 +0200 |
| |
On Wed, 2011-06-22 at 16:26 +0200, Arnd Bergmann wrote: > I think that an easy way to do that would be to add to kernel/module.c > code like: > > #ifndef module_alloc > void *module_alloc(unsigned long size) > { > return vmalloc(size); > } > #endif >
I noticed that kernel/module.c already has this:
unsigned int __weak arch_mod_section_prepend(struct module *mod, unsigned int section)
Is using a __weak attribute on the default (generic) implementations a better approach?
> Then each architecture that needs a special version can do > #define module_alloc(size) module_alloc(size) > in their respective asm/module.h
With the __weak variant this wouldn't be necessary...
/Jonas [unhandled content-type:application/pgp-signature] | |