diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-26 15:48:06 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-26 15:48:06 -0500 |
commit | b0138a6cb7923a997d278b47c176778534d1095b (patch) | |
tree | 4fcb8822a69631baba568e4e1942847747123887 /arch/parisc/kernel/module.c | |
parent | 6572d6d7d0f965dda19d02af804ed3ae4b3bf1fc (diff) | |
parent | 1055a8af093fea7490445bd15cd671020e542035 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (78 commits)
[PARISC] Use symbolic last syscall in __NR_Linux_syscalls
[PARISC] Add missing statfs64 and fstatfs64 syscalls
Revert "[PARISC] Optimize TLB flush on SMP systems"
[PARISC] Compat signal fixes for 64-bit parisc
[PARISC] Reorder syscalls to match unistd.h
Revert "[PATCH] make kernel/signal.c:kill_proc_info() static"
[PARISC] fix sys_rt_sigqueueinfo
[PARISC] fix section mismatch warnings in harmony sound driver
[PARISC] do not export get_register/set_register
[PARISC] add ENTRY()/ENDPROC() and simplify assembly of HP/UX emulation code
[PARISC] convert to use CONFIG_64BIT instead of __LP64__
[PARISC] use CONFIG_64BIT instead of __LP64__
[PARISC] add ASM_EXCEPTIONTABLE_ENTRY() macro
[PARISC] more ENTRY(), ENDPROC(), END() conversions
[PARISC] fix ENTRY() and ENDPROC() for 64bit-parisc
[PARISC] Fixes /proc/cpuinfo cache output on B160L
[PARISC] implement standard ENTRY(), END() and ENDPROC()
[PARISC] kill ENTRY_SYS_CPUS
[PARISC] clean up debugging printks in smp.c
[PARISC] factor syscall_restart code out of do_signal
...
Fix conflict in include/linux/sched.h due to kill_proc_info() being made
publicly available to PARISC again.
Diffstat (limited to 'arch/parisc/kernel/module.c')
-rw-r--r-- | arch/parisc/kernel/module.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c index f50b982b0834..fdacdd4341c9 100644 --- a/arch/parisc/kernel/module.c +++ b/arch/parisc/kernel/module.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <linux/fs.h> | 46 | #include <linux/fs.h> |
47 | #include <linux/string.h> | 47 | #include <linux/string.h> |
48 | #include <linux/kernel.h> | 48 | #include <linux/kernel.h> |
49 | #include <linux/bug.h> | ||
49 | 50 | ||
50 | #include <asm/unwind.h> | 51 | #include <asm/unwind.h> |
51 | 52 | ||
@@ -96,7 +97,7 @@ static inline int in_local_section(struct module *me, void *loc, void *dot) | |||
96 | } | 97 | } |
97 | 98 | ||
98 | 99 | ||
99 | #ifndef __LP64__ | 100 | #ifndef CONFIG_64BIT |
100 | struct got_entry { | 101 | struct got_entry { |
101 | Elf32_Addr addr; | 102 | Elf32_Addr addr; |
102 | }; | 103 | }; |
@@ -176,7 +177,7 @@ void *module_alloc(unsigned long size) | |||
176 | return vmalloc(size); | 177 | return vmalloc(size); |
177 | } | 178 | } |
178 | 179 | ||
179 | #ifndef __LP64__ | 180 | #ifndef CONFIG_64BIT |
180 | static inline unsigned long count_gots(const Elf_Rela *rela, unsigned long n) | 181 | static inline unsigned long count_gots(const Elf_Rela *rela, unsigned long n) |
181 | { | 182 | { |
182 | return 0; | 183 | return 0; |
@@ -319,7 +320,7 @@ int module_frob_arch_sections(CONST Elf_Ehdr *hdr, | |||
319 | return 0; | 320 | return 0; |
320 | } | 321 | } |
321 | 322 | ||
322 | #ifdef __LP64__ | 323 | #ifdef CONFIG_64BIT |
323 | static Elf64_Word get_got(struct module *me, unsigned long value, long addend) | 324 | static Elf64_Word get_got(struct module *me, unsigned long value, long addend) |
324 | { | 325 | { |
325 | unsigned int i; | 326 | unsigned int i; |
@@ -342,9 +343,9 @@ static Elf64_Word get_got(struct module *me, unsigned long value, long addend) | |||
342 | value); | 343 | value); |
343 | return i * sizeof(struct got_entry); | 344 | return i * sizeof(struct got_entry); |
344 | } | 345 | } |
345 | #endif /* __LP64__ */ | 346 | #endif /* CONFIG_64BIT */ |
346 | 347 | ||
347 | #ifdef __LP64__ | 348 | #ifdef CONFIG_64BIT |
348 | static Elf_Addr get_fdesc(struct module *me, unsigned long value) | 349 | static Elf_Addr get_fdesc(struct module *me, unsigned long value) |
349 | { | 350 | { |
350 | Elf_Fdesc *fdesc = me->module_core + me->arch.fdesc_offset; | 351 | Elf_Fdesc *fdesc = me->module_core + me->arch.fdesc_offset; |
@@ -368,7 +369,7 @@ static Elf_Addr get_fdesc(struct module *me, unsigned long value) | |||
368 | fdesc->gp = (Elf_Addr)me->module_core + me->arch.got_offset; | 369 | fdesc->gp = (Elf_Addr)me->module_core + me->arch.got_offset; |
369 | return (Elf_Addr)fdesc; | 370 | return (Elf_Addr)fdesc; |
370 | } | 371 | } |
371 | #endif /* __LP64__ */ | 372 | #endif /* CONFIG_64BIT */ |
372 | 373 | ||
373 | enum elf_stub_type { | 374 | enum elf_stub_type { |
374 | ELF_STUB_GOT, | 375 | ELF_STUB_GOT, |
@@ -394,7 +395,7 @@ static Elf_Addr get_stub(struct module *me, unsigned long value, long addend, | |||
394 | i * sizeof(struct stub_entry); | 395 | i * sizeof(struct stub_entry); |
395 | } | 396 | } |
396 | 397 | ||
397 | #ifndef __LP64__ | 398 | #ifndef CONFIG_64BIT |
398 | /* for 32-bit the stub looks like this: | 399 | /* for 32-bit the stub looks like this: |
399 | * ldil L'XXX,%r1 | 400 | * ldil L'XXX,%r1 |
400 | * be,n R'XXX(%sr4,%r1) | 401 | * be,n R'XXX(%sr4,%r1) |
@@ -472,7 +473,7 @@ int apply_relocate(Elf_Shdr *sechdrs, | |||
472 | return -ENOEXEC; | 473 | return -ENOEXEC; |
473 | } | 474 | } |
474 | 475 | ||
475 | #ifndef __LP64__ | 476 | #ifndef CONFIG_64BIT |
476 | int apply_relocate_add(Elf_Shdr *sechdrs, | 477 | int apply_relocate_add(Elf_Shdr *sechdrs, |
477 | const char *strtab, | 478 | const char *strtab, |
478 | unsigned int symindex, | 479 | unsigned int symindex, |
@@ -822,7 +823,8 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
822 | me->name, strtab, symhdr); | 823 | me->name, strtab, symhdr); |
823 | 824 | ||
824 | if(me->arch.got_count > MAX_GOTS) { | 825 | if(me->arch.got_count > MAX_GOTS) { |
825 | printk(KERN_ERR "%s: Global Offset Table overflow (used %ld, allowed %d\n", me->name, me->arch.got_count, MAX_GOTS); | 826 | printk(KERN_ERR "%s: Global Offset Table overflow (used %ld, allowed %d)\n", |
827 | me->name, me->arch.got_count, MAX_GOTS); | ||
826 | return -EINVAL; | 828 | return -EINVAL; |
827 | } | 829 | } |
828 | 830 | ||
@@ -850,10 +852,11 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
850 | nsyms = newptr - (Elf_Sym *)symhdr->sh_addr; | 852 | nsyms = newptr - (Elf_Sym *)symhdr->sh_addr; |
851 | DEBUGP("NEW num_symtab %lu\n", nsyms); | 853 | DEBUGP("NEW num_symtab %lu\n", nsyms); |
852 | symhdr->sh_size = nsyms * sizeof(Elf_Sym); | 854 | symhdr->sh_size = nsyms * sizeof(Elf_Sym); |
853 | return 0; | 855 | return module_bug_finalize(hdr, sechdrs, me); |
854 | } | 856 | } |
855 | 857 | ||
856 | void module_arch_cleanup(struct module *mod) | 858 | void module_arch_cleanup(struct module *mod) |
857 | { | 859 | { |
858 | deregister_unwind_table(mod); | 860 | deregister_unwind_table(mod); |
861 | module_bug_cleanup(mod); | ||
859 | } | 862 | } |