aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2003-08-31 01:58:18 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2003-08-31 01:58:18 +0000
commitc2942f0904edffa58877abf9d1f13c5d91a0ddee (patch)
treeb87634b0c5112b170b00e6a334ba1158fefa3ced
parentbb13624d8c31d5e4b725c5df0d9d19d834dc4a7b (diff)
downloadbusybox-w32-c2942f0904edffa58877abf9d1f13c5d91a0ddee.tar.gz
busybox-w32-c2942f0904edffa58877abf9d1f13c5d91a0ddee.tar.bz2
busybox-w32-c2942f0904edffa58877abf9d1f13c5d91a0ddee.zip
"insmod caches the symbolname in a variable before modifying it and uses
the cached value afterwards." - Jean Wolter
-rw-r--r--modutils/insmod.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/modutils/insmod.c b/modutils/insmod.c
index 4676b5aa8..54463a9d0 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -253,7 +253,7 @@
253#ifndef MODUTILS_MODULE_H 253#ifndef MODUTILS_MODULE_H
254static const int MODUTILS_MODULE_H = 1; 254static const int MODUTILS_MODULE_H = 1;
255 255
256#ident "$Id: insmod.c,v 1.101 2003/08/30 06:00:33 bug1 Exp $" 256#ident "$Id: insmod.c,v 1.102 2003/08/31 01:58:18 bug1 Exp $"
257 257
258/* This file contains the structures used by the 2.0 and 2.1 kernels. 258/* This file contains the structures used by the 2.0 and 2.1 kernels.
259 We do not use the kernel headers directly because we do not wish 259 We do not use the kernel headers directly because we do not wish
@@ -474,7 +474,7 @@ int delete_module(const char *);
474#ifndef MODUTILS_OBJ_H 474#ifndef MODUTILS_OBJ_H
475static const int MODUTILS_OBJ_H = 1; 475static const int MODUTILS_OBJ_H = 1;
476 476
477#ident "$Id: insmod.c,v 1.101 2003/08/30 06:00:33 bug1 Exp $" 477#ident "$Id: insmod.c,v 1.102 2003/08/31 01:58:18 bug1 Exp $"
478 478
479/* The relocatable object is manipulated using elfin types. */ 479/* The relocatable object is manipulated using elfin types. */
480 480
@@ -1942,7 +1942,7 @@ add_symbols_from(
1942 argument initialization. We will also create a false 1942 argument initialization. We will also create a false
1943 dependency on the module. */ 1943 dependency on the module. */
1944 struct obj_symbol *sym; 1944 struct obj_symbol *sym;
1945 char *name = (char *)s->name; 1945 char *name;
1946 1946
1947 /* GPL licensed modules can use symbols exported with 1947 /* GPL licensed modules can use symbols exported with
1948 * EXPORT_SYMBOL_GPL, so ignore any GPLONLY_ prefix on the 1948 * EXPORT_SYMBOL_GPL, so ignore any GPLONLY_ prefix on the
@@ -1956,6 +1956,7 @@ add_symbols_from(
1956 else 1956 else
1957 continue; 1957 continue;
1958 } 1958 }
1959 name = (char *)s->name;
1959 1960
1960#ifdef SYMBOL_PREFIX 1961#ifdef SYMBOL_PREFIX
1961 /* Prepend SYMBOL_PREFIX to the symbol's name (the 1962 /* Prepend SYMBOL_PREFIX to the symbol's name (the
@@ -4129,6 +4130,14 @@ extern int insmod_main( int argc, char **argv)
4129 4130
4130 printf("Using %s\n", m_filename); 4131 printf("Using %s\n", m_filename);
4131 4132
4133#ifdef CONFIG_FEATURE_REALLY_NEW_MODULE_INTERFACE
4134 if (create_module(NULL, 0) < 0 && errno == ENOSYS) {
4135 optind--;
4136 argv[optind] = m_filename;
4137 return insmod_ng_main(argc - optind, argv + optind);
4138 }
4139#endif
4140
4132 if ((f = obj_load(fp, LOADBITS)) == NULL) 4141 if ((f = obj_load(fp, LOADBITS)) == NULL)
4133 bb_perror_msg_and_die("Could not load the module"); 4142 bb_perror_msg_and_die("Could not load the module");
4134 4143