===== kernel/module.c 1.99 vs edited =====
--- 1.99/kernel/module.c Wed Jan 21 02:50:58 2004
+++ edited/kernel/module.c Sat Jan 31 13:50:47 2004
@@ -150,14 +150,14 @@
/* Core kernel first. */
*owner = NULL;
- for (i = 0; __start___ksymtab+i < __stop___ksymtab; i++) {
+ for (i = 0; __start___ksymtab+i*sizeof(struct kernel_symbol) < __stop___ksymtab; i++) {
if (strcmp(__start___ksymtab[i].name, name) == 0) {
*crc = symversion(__start___kcrctab, i);
return __start___ksymtab[i].value;
}
}
if (gplok) {
- for (i = 0; __start___ksymtab_gpl+i<__stop___ksymtab_gpl; i++)
+ for (i = 0; __start___ksymtab_gpl+i*sizeof(struct kernel_symbol) < __stop___ksymtab_gpl; i++)
if (strcmp(__start___ksymtab_gpl[i].name, name) == 0) {
*crc = symversion(__start___kcrctab_gpl, i);
return __start___ksymtab_gpl[i].value;
@@ -1308,7 +1308,7 @@
unsigned int i;
if (!mod) {
- for (i = 0; __start___ksymtab+i < __stop___ksymtab; i++)
+ for (i = 0; __start___ksymtab+i*sizeof(struct kernel_symbol) < __stop___ksymtab; i++)
if (strcmp(__start___ksymtab[i].name, name) == 0)
return 1;
return 0;
In message <[email protected]> you write:
> - for (i = 0; __start___ksymtab+i < __stop___ksymtab; i++) {
> + for (i = 0; __start___ksymtab+i*sizeof(struct kernel_symbol) < __stop___ksymtab; i++) {
Above in this file, there is the declaration:
extern const struct kernel_symbol __start___ksymtab[];
What makes you think you need to multiply here?
Puzzled,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
Rusty Russell wrote:
> In message <[email protected]> you write:
>
>>- for (i = 0; __start___ksymtab+i < __stop___ksymtab; i++) {
>>+ for (i = 0; __start___ksymtab+i*sizeof(struct kernel_symbol) < __stop___ksymtab; i++) {
>
>
> Above in this file, there is the declaration:
>
> extern const struct kernel_symbol __start___ksymtab[];
>
> What makes you think you need to multiply here?
-ENOCAFFEINE. (Note to self: Never send patches while asleep)
Now that I'm awake again, I feel ashamed.
> Puzzled,
> Rusty.
Sorry for the confusion,
Carl-Daniel.