Skip to contentSkip to conversation

2.5.59 vmlinux.lds.S change broke modules

DISCUSSION Mikael Pettersson 1 participant 1 message Jan 18, 2003

lore
Share & tools
lore
#0 lore raw
Quoted 5 lines · Kai Germaschewski

Okay, the details I received so far seem to indicate that the appended patch will fix it, though I didn't get actual confirmation it does.

If you experience crashes when loading modules (and have RH 8 binutils), please give it a shot.

...

Quoted 17 lines

diff -Nru a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h

include/asm-generic/vmlinux.lds.h +2 -2
@@ -13,18 +13,18 @@
 	}								\
 									\
 	/* Kernel symbol table: Normal symbols */			\
-	__start___ksymtab = .;						\
 	__ksymtab         : AT(ADDR(__ksymtab) - LOAD_OFFSET) {		\
+		__start___ksymtab = .;					\
 		*(__ksymtab)						\
+		__stop___ksymtab = .;					\
 	}								\
-	__stop___ksymtab = .;						\
 									\
 	/* Kernel symbol table: GPL-only symbols */			\

include/asm-generic/vmlinux.lds.h line 30

Quoted 10 lines
include/asm-generic/vmlinux.lds.h +2 -2
-	__start___gpl_ksymtab = .;					\
 	__gpl_ksymtab     : AT(ADDR(__gpl_ksymtab) - LOAD_OFFSET) {	\
+		__start___gpl_ksymtab = .;				\
 		*(__gpl_ksymtab)					\
+		__stop___gpl_ksymtab = .;				\
 	}								\
-	__stop___gpl_ksymtab = .;					\
 									\
 	/* Kernel symbol table: strings */				\
        __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) {	\

This patch fixed the module-loading problem for me. Thanks.

Note that the problem wasn't specific to RH8.0 binutils:
I've also seen it with binutils-2.10.91 from RH7.1.

/Mikael