diff options
| author | Linus Torvalds <torvalds@home.transmeta.com> | 2003-01-15 16:29:29 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-01-15 16:29:29 -0800 |
| commit | a358e2a5b439eabc81d369833072ea3d77173162 (patch) | |
| tree | 0339d3e51107efc1fd77878d27a69727586f227c /include | |
| parent | c9b1ca0d29ab35ca924c36b479011e4a9aaec051 (diff) | |
| parent | 89f97c42857deb5a9229180e3d72cb823cab12bc (diff) | |
Merge http://linux-isdn.bkbits.net/linux-2.5.make
into home.transmeta.com:/home/torvalds/v2.5/linux
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-generic/vmlinux.lds.h | 57 | ||||
| -rw-r--r-- | include/linux/module.h | 24 |
2 files changed, 48 insertions, 33 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 9e0847712481..3d97aae1c3e6 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -1,24 +1,33 @@ -#define RODATA \ - .rodata : { *(.rodata) *(.rodata.*) *(.rodata1) } \ - .rodata1 : { *(.rodata1) } \ - \ - .kstrtab : { *(.kstrtab) } \ - \ - /* Kernel version magic */ \ - __vermagic : { *(__vermagic) } \ - \ - /* Kernel symbol table */ \ - . = ALIGN(64); \ - __start___ksymtab = .; \ - __ksymtab : { *(__ksymtab) } \ - __stop___ksymtab = .; \ - \ - /* Kernel symbol table: GPL-only symbols */ \ - __start___gpl_ksymtab = .; \ - __gpl_ksymtab : { *(__gpl_ksymtab) } \ - __stop___gpl_ksymtab = .; \ - \ - /* All kernel symbols */ \ - __start___kallsyms = .; \ - __kallsyms : { *(__kallsyms) } \ - __stop___kallsyms = .; +#ifndef LOAD_OFFSET +#define LOAD_OFFSET 0 +#endif + +#define RODATA \ + .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \ + *(.rodata) *(.rodata.*) \ + *(__vermagic) /* Kernel version magic */ \ + } \ + \ + .rodata1 : AT(ADDR(.rodata1) - LOAD_OFFSET) { \ + *(.rodata1) \ + } \ + \ + /* Kernel symbol table: Normal symbols */ \ + __start___ksymtab = .; \ + __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \ + *(__ksymtab) \ + } \ + __stop___ksymtab = .; \ + \ + /* Kernel symbol table: GPL-only symbols */ \ + __start___gpl_ksymtab = .; \ + __gpl_ksymtab : AT(ADDR(__gpl_ksymtab) - LOAD_OFFSET) { \ + *(__gpl_ksymtab) \ + } \ + __stop___gpl_ksymtab = .; \ + \ + /* Kernel symbol table: strings */ \ + __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \ + *(__ksymtab_strings) \ + } + diff --git a/include/linux/module.h b/include/linux/module.h index f38e535eacd9..507fa6c563ef 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -36,7 +36,7 @@ struct kernel_symbol { unsigned long value; - char name[MODULE_NAME_LEN]; + const char *name; }; /* These are either module local, or the kernel's dummy ones. */ @@ -140,17 +140,23 @@ void *__symbol_get_gpl(const char *symbol); #define symbol_get(x) ((typeof(&x))(__symbol_get(MODULE_SYMBOL_PREFIX #x))) /* For every exported symbol, place a struct in the __ksymtab section */ -#define EXPORT_SYMBOL(sym) \ - const struct kernel_symbol __ksymtab_##sym \ - __attribute__((section("__ksymtab"))) \ - = { (unsigned long)&sym, MODULE_SYMBOL_PREFIX #sym } +#define EXPORT_SYMBOL(sym) \ + static const char __kstrtab_##sym[] \ + __attribute__((section("__ksymtab_strings"))) \ + = MODULE_SYMBOL_PREFIX #sym; \ + static const struct kernel_symbol __ksymtab_##sym \ + __attribute__((section("__ksymtab"))) \ + = { (unsigned long)&sym, __kstrtab_##sym } #define EXPORT_SYMBOL_NOVERS(sym) EXPORT_SYMBOL(sym) -#define EXPORT_SYMBOL_GPL(sym) \ - const struct kernel_symbol __ksymtab_##sym \ - __attribute__((section("__gpl_ksymtab"))) \ - = { (unsigned long)&sym, #sym } +#define EXPORT_SYMBOL_GPL(sym) \ + static const char __kstrtab_##sym[] \ + __attribute__((section("__ksymtab_strings"))) \ + = MODULE_SYMBOL_PREFIX #sym; \ + static const struct kernel_symbol __ksymtab_##sym \ + __attribute__((section("__gpl_ksymtab"))) \ + = { (unsigned long)&sym, __kstrtab_##sym } struct module_ref { |
