1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
diff -urN ../tmp-orig/modutils-2.4.26/depmod/depmod.c ./depmod/depmod.c
--- ../tmp-orig/modutils-2.4.26/depmod/depmod.c 2003-03-23 02:34:28.000000000 +0000
+++ ./depmod/depmod.c 2004-11-30 09:58:15.000000000 +0000
@@ -1133,7 +1133,7 @@
for (ksym = ksyms; so_far < nksyms; ++so_far, ksym++) {
if (strncmp((char *)ksym->name, "GPLONLY_", 8) == 0)
- ((char *)ksym->name) += 8;
+ ksym->name = ((char *)ksym->name) + 8;
assert(n_syms < MAX_MAP_SYM);
symtab[n_syms++] = addsym((char *)ksym->name, mod, SYM_DEFINED, 0);
}
diff -urN ../tmp-orig/modutils-2.4.26/genksyms/genksyms.c ./genksyms/genksyms.c
--- ../tmp-orig/modutils-2.4.26/genksyms/genksyms.c 2002-03-01 00:39:06.000000000 +0000
+++ ./genksyms/genksyms.c 2004-11-30 09:58:15.000000000 +0000
@@ -45,7 +45,7 @@
int flag_debug, flag_dump_defs, flag_warnings;
int checksum_version = 1, kernel_version = version(2,0,0);
-static int errors;
+static int _errors;
static int nsyms;
static struct symbol *expansion_trail;
@@ -458,7 +458,7 @@
va_end(args);
putc('\n', stderr);
- errors++;
+ _errors++;
}
}
@@ -476,7 +476,7 @@
va_end(args);
putc('\n', stderr);
- errors++;
+ _errors++;
}
}
@@ -597,5 +597,5 @@
nsyms, HASH_BUCKETS, (double)nsyms / (double)HASH_BUCKETS);
}
- return errors != 0;
+ return _errors != 0;
}
diff -urN ../tmp-orig/modutils-2.4.26/insmod/insmod.c ./insmod/insmod.c
--- ../tmp-orig/modutils-2.4.26/insmod/insmod.c 2003-10-27 02:34:46.000000000 +0000
+++ ./insmod/insmod.c 2004-11-30 09:57:07.000000000 +0000
@@ -275,7 +275,7 @@
if (strncmp((char *)s->name, "GPLONLY_", 8) == 0) {
gplonly_seen = 1;
if (gpl)
- ((char *)s->name) += 8;
+ s->name = ((char *)s->name) + 8;
else
continue;
}
diff -urN ../tmp-orig/modutils-2.4.26/insmod/insmod.c.rej ./insmod/insmod.c.rej
--- ../tmp-orig/modutils-2.4.26/insmod/insmod.c.rej 1970-01-01 00:00:00.000000000 +0000
+++ ./insmod/insmod.c.rej 2004-11-30 09:58:17.000000000 +0000
@@ -0,0 +1,17 @@
+***************
+*** 275,281 ****
+ if (strncmp((char *)s->name, "GPLONLY_", 8) == 0) {
+ gplonly_seen = 1;
+ if (gpl)
+- ((char *)s->name) += 8;
+ else
+ continue;
+ }
+--- 275,281 ----
+ if (strncmp((char *)s->name, "GPLONLY_", 8) == 0) {
+ gplonly_seen = 1;
+ if (gpl)
++ s->name = ((char *)s->name) + 8;
+ else
+ continue;
+ }
diff -urN ../tmp-orig/modutils-2.4.26/obj/obj_kallsyms.c ./obj/obj_kallsyms.c
--- ../tmp-orig/modutils-2.4.26/obj/obj_kallsyms.c 2002-03-01 00:39:06.000000000 +0000
+++ ./obj/obj_kallsyms.c 2004-11-30 09:54:52.000000000 +0000
@@ -200,8 +200,8 @@
/* Initial contents, header + one entry per input section. No strings. */
osec->header.sh_size = sizeof(*a_hdr) + loaded*sizeof(*a_sec);
- a_hdr = (struct kallsyms_header *) osec->contents =
- xmalloc(osec->header.sh_size);
+ osec->contents = xmalloc(osec->header.sh_size);
+ a_hdr = (struct kallsyms_header *) osec->contents;
memset(osec->contents, 0, osec->header.sh_size);
a_hdr->size = sizeof(*a_hdr);
a_hdr->sections = loaded;
@@ -275,8 +275,8 @@
a_hdr->symbol_off +
a_hdr->symbols*a_hdr->symbol_size +
strings_size - strings_left;
- a_hdr = (struct kallsyms_header *) osec->contents =
- xrealloc(a_hdr, a_hdr->total_size);
+ osec->contents = xrealloc(a_hdr, a_hdr->total_size);
+ a_hdr = (struct kallsyms_header *) osec->contents;
p = (char *)a_hdr + a_hdr->symbol_off;
memcpy(p, symbols, a_hdr->symbols*a_hdr->symbol_size);
free(symbols);
diff -urN ../tmp-orig/modutils-2.4.26/obj/obj_kallsyms.c.rej ./obj/obj_kallsyms.c.rej
--- ../tmp-orig/modutils-2.4.26/obj/obj_kallsyms.c.rej 1970-01-01 00:00:00.000000000 +0000
+++ ./obj/obj_kallsyms.c.rej 2004-11-30 09:58:18.000000000 +0000
@@ -0,0 +1,38 @@
+***************
+*** 200,207 ****
+
+ /* Initial contents, header + one entry per input section. No strings. */
+ osec->header.sh_size = sizeof(*a_hdr) + loaded*sizeof(*a_sec);
+- a_hdr = (struct kallsyms_header *) osec->contents =
+- xmalloc(osec->header.sh_size);
+ memset(osec->contents, 0, osec->header.sh_size);
+ a_hdr->size = sizeof(*a_hdr);
+ a_hdr->sections = loaded;
+--- 200,207 ----
+
+ /* Initial contents, header + one entry per input section. No strings. */
+ osec->header.sh_size = sizeof(*a_hdr) + loaded*sizeof(*a_sec);
++ osec->contents = xmalloc(osec->header.sh_size);
++ a_hdr = (struct kallsyms_header *) osec->contents;
+ memset(osec->contents, 0, osec->header.sh_size);
+ a_hdr->size = sizeof(*a_hdr);
+ a_hdr->sections = loaded;
+***************
+*** 275,282 ****
+ a_hdr->symbol_off +
+ a_hdr->symbols*a_hdr->symbol_size +
+ strings_size - strings_left;
+- a_hdr = (struct kallsyms_header *) osec->contents =
+- xrealloc(a_hdr, a_hdr->total_size);
+ p = (char *)a_hdr + a_hdr->symbol_off;
+ memcpy(p, symbols, a_hdr->symbols*a_hdr->symbol_size);
+ free(symbols);
+--- 275,282 ----
+ a_hdr->symbol_off +
+ a_hdr->symbols*a_hdr->symbol_size +
+ strings_size - strings_left;
++ osec->contents = xrealloc(a_hdr, a_hdr->total_size);
++ a_hdr = (struct kallsyms_header *) osec->contents;
+ p = (char *)a_hdr + a_hdr->symbol_off;
+ memcpy(p, symbols, a_hdr->symbols*a_hdr->symbol_size);
+ free(symbols);
diff -urN ../tmp-orig/modutils-2.4.26/obj/obj_ppc.c ./obj/obj_ppc.c
--- ../tmp-orig/modutils-2.4.26/obj/obj_ppc.c 2002-03-01 00:39:06.000000000 +0000
+++ ./obj/obj_ppc.c 2004-11-30 09:55:50.000000000 +0000
@@ -255,7 +255,8 @@
archdata_sec->header.sh_size = 0;
sec = obj_find_section(f, "__ftr_fixup");
if (sec) {
- ad = (struct archdata *) (archdata_sec->contents) = xmalloc(sizeof(*ad));
+ archdata_sec->contents = xmalloc(sizeof(*ad));
+ ad = (struct archdata *) (archdata_sec->contents);
memset(ad, 0, sizeof(*ad));
archdata_sec->header.sh_size = sizeof(*ad);
ad->__start___ftr_fixup = sec->header.sh_addr;
|