aboutsummaryrefslogtreecommitdiff
path: root/modutils/insmod.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-04-05 03:14:39 +0000
committerEric Andersen <andersen@codepoet.org>2001-04-05 03:14:39 +0000
commite76c3b08e105147e3cef7e8d38d65da2fac6b2e1 (patch)
tree87f705b9e4e4e48700ac61e9538c637ae2b395a7 /modutils/insmod.c
parent3c0364f3911ec9f43e1c8c96ec2c8e30b1b52c47 (diff)
downloadbusybox-w32-e76c3b08e105147e3cef7e8d38d65da2fac6b2e1.tar.gz
busybox-w32-e76c3b08e105147e3cef7e8d38d65da2fac6b2e1.tar.bz2
busybox-w32-e76c3b08e105147e3cef7e8d38d65da2fac6b2e1.zip
A number of cleanups. Now compiles with libc5, glibc, and uClibc. Fix a few
shadowed variables. Move (almost) all syscalls to libbb/syscalls.c, so I can handle them sanely and all at once. -Erik
Diffstat (limited to 'modutils/insmod.c')
-rw-r--r--modutils/insmod.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/modutils/insmod.c b/modutils/insmod.c
index 0a7cb1e4a..ad1486b7b 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -119,7 +119,7 @@
119#ifndef MODUTILS_MODULE_H 119#ifndef MODUTILS_MODULE_H
120static const int MODUTILS_MODULE_H = 1; 120static const int MODUTILS_MODULE_H = 1;
121 121
122#ident "$Id: insmod.c,v 1.53 2001/03/22 19:01:16 andersen Exp $" 122#ident "$Id: insmod.c,v 1.54 2001/04/05 03:14:39 andersen Exp $"
123 123
124/* This file contains the structures used by the 2.0 and 2.1 kernels. 124/* This file contains the structures used by the 2.0 and 2.1 kernels.
125 We do not use the kernel headers directly because we do not wish 125 We do not use the kernel headers directly because we do not wish
@@ -325,7 +325,7 @@ int delete_module(const char *);
325#ifndef MODUTILS_OBJ_H 325#ifndef MODUTILS_OBJ_H
326static const int MODUTILS_OBJ_H = 1; 326static const int MODUTILS_OBJ_H = 1;
327 327
328#ident "$Id: insmod.c,v 1.53 2001/03/22 19:01:16 andersen Exp $" 328#ident "$Id: insmod.c,v 1.54 2001/04/05 03:14:39 andersen Exp $"
329 329
330/* The relocatable object is manipulated using elfin types. */ 330/* The relocatable object is manipulated using elfin types. */
331 331
@@ -1210,18 +1210,18 @@ int arch_create_got(struct obj_file *f)
1210 1210
1211#if defined(BB_USE_GOT_ENTRIES) 1211#if defined(BB_USE_GOT_ENTRIES)
1212 if (got_offset) { 1212 if (got_offset) {
1213 struct obj_section* relsec = obj_find_section(f, ".got"); 1213 struct obj_section* myrelsec = obj_find_section(f, ".got");
1214 1214
1215 if (relsec) { 1215 if (myrelsec) {
1216 obj_extend_section(relsec, got_offset); 1216 obj_extend_section(myrelsec, got_offset);
1217 } else { 1217 } else {
1218 relsec = obj_create_alloced_section(f, ".got", 1218 myrelsec = obj_create_alloced_section(f, ".got",
1219 BB_GOT_ENTRY_SIZE, 1219 BB_GOT_ENTRY_SIZE,
1220 got_offset); 1220 got_offset);
1221 assert(relsec); 1221 assert(myrelsec);
1222 } 1222 }
1223 1223
1224 ifile->got = relsec; 1224 ifile->got = myrelsec;
1225 } 1225 }
1226#endif 1226#endif
1227 1227
@@ -1748,19 +1748,19 @@ old_process_module_arguments(struct obj_file *f, int argc, char **argv)
1748 while (*q++ == ','); 1748 while (*q++ == ',');
1749 } else { 1749 } else {
1750 char *contents = f->sections[sym->secidx]->contents; 1750 char *contents = f->sections[sym->secidx]->contents;
1751 char *loc = contents + sym->value; 1751 char *myloc = contents + sym->value;
1752 char *r; /* To search for commas */ 1752 char *r; /* To search for commas */
1753 1753
1754 /* Break the string with comas */ 1754 /* Break the string with comas */
1755 while ((r = strchr(q, ',')) != (char *) NULL) { 1755 while ((r = strchr(q, ',')) != (char *) NULL) {
1756 *r++ = '\0'; 1756 *r++ = '\0';
1757 obj_string_patch(f, sym->secidx, loc - contents, q); 1757 obj_string_patch(f, sym->secidx, myloc - contents, q);
1758 loc += sizeof(char *); 1758 myloc += sizeof(char *);
1759 q = r; 1759 q = r;
1760 } 1760 }
1761 1761
1762 /* last part */ 1762 /* last part */
1763 obj_string_patch(f, sym->secidx, loc - contents, q); 1763 obj_string_patch(f, sym->secidx, myloc - contents, q);
1764 } 1764 }
1765 1765
1766 argc--, argv++; 1766 argc--, argv++;