diff -Nur modutils-2.4.23/ChangeLog modutils-2.4.24/ChangeLog --- modutils-2.4.23/ChangeLog Thu Mar 13 14:39:45 2003 +++ modutils-2.4.24/ChangeLog Sun Mar 23 13:43:54 2003 @@ -1,3 +1,11 @@ +2003-03-23 Keith Owens + + modutils 2.4.24 + + * Remove the default of exporting all symbols, but only on + architectures that have function descriptors (ia64, ppc64). + * Add libmodutils.a to make clean list. + 2003-03-13 Keith Owens modutils 2.4.23 diff -Nur modutils-2.4.23/depmod/depmod.c modutils-2.4.24/depmod/depmod.c --- modutils-2.4.23/depmod/depmod.c Tue Jul 30 18:00:17 2002 +++ modutils-2.4.24/depmod/depmod.c Sun Mar 23 13:34:28 2003 @@ -904,13 +904,17 @@ * It might still want to export symbols, * although strictly speaking it shouldn't... * (Seen in pcmcia) + * Architectures with function descriptors must + * not do this, it is unsafe. */ +#ifndef HAS_FUNCTION_DESCRIPTORS if (ELFW(ST_BIND)(objsym->info) == STB_GLOBAL) { defsym[n_defsym++] = addsym(objsym->name, mod, SYM_DEFINED, ignore_suffix); } +#endif continue; } /* else */ diff -Nur modutils-2.4.23/include/util.h modutils-2.4.24/include/util.h --- modutils-2.4.23/include/util.h Fri Mar 1 11:39:06 2002 +++ modutils-2.4.24/include/util.h Sun Mar 23 13:34:28 2003 @@ -96,4 +96,8 @@ #define SYMPREFIX "__insmod_"; extern const char symprefix[10]; /* Must be sizeof(SYMPREFIX), including nul */ +#if defined(ARCH_ia64) || defined(ARCH_ppc64) +#define HAS_FUNCTION_DESCRIPTORS +#endif + #endif /* util.h */ diff -Nur modutils-2.4.23/include/version.h modutils-2.4.24/include/version.h --- modutils-2.4.23/include/version.h Thu Nov 28 00:29:33 2002 +++ modutils-2.4.24/include/version.h Sun Mar 23 12:27:40 2003 @@ -1 +1 @@ -#define MODUTILS_VERSION "2.4.23" +#define MODUTILS_VERSION "2.4.24" diff -Nur modutils-2.4.23/insmod/Makefile.in modutils-2.4.24/insmod/Makefile.in --- modutils-2.4.23/insmod/Makefile.in Mon Nov 25 14:43:33 2002 +++ modutils-2.4.24/insmod/Makefile.in Sun Mar 23 13:43:54 2003 @@ -129,7 +129,7 @@ done clean: - rm -f *.o $(PROGS) *.static + rm -f *.o $(PROGS) *.static libmodutils.a realclean: clean rm -f .depend diff -Nur modutils-2.4.23/insmod/insmod.c modutils-2.4.24/insmod/insmod.c --- modutils-2.4.23/insmod/insmod.c Tue Jan 28 03:22:02 2003 +++ modutils-2.4.24/insmod/insmod.c Sun Mar 23 13:34:28 2003 @@ -56,6 +56,8 @@ Keith Owens November 2000. Add tainted module support. Keith Owens September 2001. + Default to no exports for architectures with function descriptors. + Keith Owens March 2003. */ #include @@ -86,7 +88,11 @@ static int flag_force_load = 0; static int flag_silent_probe = 0; +#ifdef HAS_FUNCTION_DESCRIPTORS +static int flag_export = 0; +#else static int flag_export = 1; +#endif static int flag_load_map = 0; static int flag_ksymoops = 1; static int flag_numeric_only = 0; @@ -1724,7 +1730,12 @@ flag_export = 0; break; case 'X': /* do export externs */ +#ifdef HAS_FUNCTION_DESCRIPTORS + fputs("This architecture has function descriptors, exporting everything is unsafe\n" + "You must explicitly export the desired symbols with EXPORT_SYMBOL()\n", stderr); +#else flag_export = 1; +#endif break; case 'y': /* do not define ksymoops symbols */ flag_ksymoops = 0; diff -Nur modutils-2.4.23/man/insmod.8 modutils-2.4.24/man/insmod.8 --- modutils-2.4.23/man/insmod.8 Wed Feb 12 14:51:53 2003 +++ modutils-2.4.24/man/insmod.8 Sun Mar 23 13:34:28 2003 @@ -2,7 +2,7 @@ .\" This program is distributed according to the Gnu General Public License. .\" See the file COPYING in the kernel source directory. .\" -.TH INSMOD 8 "February 12, 2003" Linux "Linux Module Support" +.TH INSMOD 8 "March 23, 2003" Linux "Linux Module Support" .SH NAME insmod \- install loadable kernel module .hy 0 @@ -158,9 +158,12 @@ .TP .BR \-X ", " \-\-export "; " \-x ", " \-\-noexport Do and do not export all of the module's external symbols, respectively. -The default is for the symbols to be exported. This option is only -effective if the module does not explicitly export its own controlled -symbol table, and thus is deprecated. +The default is for the symbols to be exported, unless the architecture +has function descriptors. +This option is only effective if the module does not explicitly export +its own controlled symbol table, and thus is deprecated. +It is unsafe on architectures with function descriptors and has been +disabled for such architectures. .TP .BR \-Y ", " \-\-ksymoops "; " \-y ", " \-\-noksymoops Do and do not add \fBksymoops\fR symbols to ksyms. These symbols are used by diff -Nur modutils-2.4.23/modutils.spec modutils-2.4.24/modutils.spec --- modutils-2.4.23/modutils.spec Thu Nov 28 00:29:33 2002 +++ modutils-2.4.24/modutils.spec Sun Mar 23 12:27:40 2003 @@ -1,6 +1,6 @@ Summary: Module utilities Name: modutils -Version: 2.4.23 +Version: 2.4.24 Release: 1 Copyright: GPL Group: Utilities/System