2.5.45: NTFS unresolved symbol
Subsystems (3)
depmod: *** Unresolved symbols in /lib/modules/2.5.45/kernel/fs/ntfs/ntfs.o
depmod: page_states__per_cpu/lib/modules/2.5.45/kernel/fs/ntfs/ntfs.o
x86 (Athlon)
-Dieter
Quoted 3 lines · On Fri, 1 Nov 2002, Dieter [iso-8859-15] Nützel wrote:
depmod: *** Unresolved symbols in
/lib/modules/2.5.45/kernel/fs/ntfs/ntfs.o
depmod:page_states__per_cpu/lib/modules/2.5.45/kernel/fs/ntfs/ntfs.o
Hi, The following patch should fix it:
ksyms.c renamed from ksyms.c~ +1 -0
@@ -112,6 +112,7 @@EXPORT_SYMBOL (vunmap);EXPORT_SYMBOL (vmalloc_to_page);EXPORT_SYMBOL (remap_page_range); +EXPORT_SYMBOL (page_states__per_cpu);#ifndef CONFIG_DISCONTIGMEM EXPORT_SYMBOL (contig_page_data);EXPORT_SYMBOL (mem_map);
pkot
Signature · 2 lines
mailto:[email protected] :: mailto:[email protected] http://kt.linuxnews.pl/ :: Kernel Traffic po polsku
Quoted 11 lines · Pawel Kot
Quoted 3 lines · On Fri, 1 Nov 2002, Dieter [iso-8859-15] Nützel wrote:
depmod: *** Unresolved symbols in
/lib/modules/2.5.45/kernel/fs/ntfs/ntfs.o
depmod:page_states__per_cpu/lib/modules/2.5.45/kernel/fs/ntfs/ntfs.oHi, The following patch should fix it:
ksyms.c Fri Nov 1 13:16:51 2002 line 118
Quoted 7 lines
ksyms.c Fri Nov 1 13:16:51 2002 renamed from ksyms.c~ Fri Nov 1 13:16:51 2002 +1
-0@@ -112,6 +112,7 @@ EXPORT_SYMBOL(vunmap); EXPORT_SYMBOL(vmalloc_to_page); EXPORT_SYMBOL(remap_page_range); +EXPORT_SYMBOL(page_states__per_cpu); #ifndef CONFIG_DISCONTIGMEM EXPORT_SYMBOL(contig_page_data); EXPORT_SYMBOL(mem_map);
Oh gawd. Here's what happened..
We have these magical symbols which describe the offset of a member of the per-cpu storage, which need to be exposed to modules. So I added an EXPORT_PER_CPU_SYMBOL() helper:
#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(var##__per_cpu) #define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(var##__per_cpu)
Which works OK without module versioning. But with module versioning, genksyms goes looking through source files for "EXPORT_SYMBOL". Which isn't there.
So sigh. Need to go back to the drawing board on that one. In the meantime, this should work?
mm/page_alloc.c renamed from mm/page_alloc.c~genksyms-hurts +1 -1
@@ -650,7 +650,7 @@ unsigned int nr_free_highpages (void)* during and after execution of this function. */ DEFINE_PER_CPU(struct page_state, page_states) = {0}; -EXPORT_PER_CPU_SYMBOL (page_states); +EXPORT_SYMBOL (page_states__per_cpu);void __get_page_state (struct page_state *ret,int nr) {
.
Quoted 6 lines · Andrew Morton
We have these magical symbols which describe the offset of a member of the per-cpu storage, which need to be exposed to modules. So I added an
EXPORT_PER_CPU_SYMBOL()helper:#define
EXPORT_PER_CPU_SYMBOL(var)EXPORT_SYMBOL(var##__per_cpu)#defineEXPORT_PER_CPU_SYMBOL_GPL(var)EXPORT_SYMBOL_GPL(var##__per_cpu)
I would expect the following to work:
#define EXPORT_SYMBOL_PER_CPU(var) EXPORT_SYMBOL(var##__per_cpu) #define EXPORT_SYMBOL_PER_CPU_GPL(var) EXPORT_SYMBOL_GPL(var##__per_cpu)
In this case the magic "EXPORT_SYMBOL" is still present.
Sam
In message <[email protected]> you write:
Quoted 5 lines
Quoted 1 line
+EXPORT_SYMBOL(page_states__per_cpu);
Which works OK without module versioning. But with module versioning, genksyms goes looking through source files for "
EXPORT_SYMBOL". Which isn't there.
Proper fix below. Linus please apply.
The source is run through CPP before hitting genksyms (which is why the #define EXPORT_SYMBOL is under #ifndef __GENKSYMS__). So in fact, "EXPORT_SYMBOL( page_states__per_cpu) ;" gets to kenksyms. But your fix doesn't work either: genksyms can't handle the __typeof__ in the definition it sees, and gives up.
Note, that this fix (almost certainly) breaks:
DEFINE_PER_CPU(int[3], myvar); EXPORT_PER_CPU_SYMBOL(myvar);
But we'd need to teach genksyms about EXPORT_PER_CPU_SYMBOL or __typeof__ for that[1]
Rusty.
[1] Proving the point about the separation of that from the kernel source being wrong.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
include/asm-generic/percpu.h +6 -0
@@ -35,4 +35,10 @@ extern unsigned long __per_cpu_offset[NR#define EXPORT_PER_CPU_SYMBOL (var) EXPORT_SYMBOL(var##__per_cpu)#define EXPORT_PER_CPU_SYMBOL_GPL (var) EXPORT_SYMBOL_GPL(var##__per_cpu) +/* Genksyms can't follow the percpu declaration. Give it a fake one. */ +#ifdef __GENKSYMS__ +#undef DEFINE_PER_CPU +#define DEFINE_PER_CPU (type, name) type name##__per_cpu +#endif /*__GENKSYMS__*/ +#endif /* _ASM_GENERIC_PERCPU_H_ */