[ This is Richard being nitpicky, but it's worth keeping him happy 8) ]
Name: Strtab by sh_link field.
From: Richard Henderson <rth@twiddle.net>
Status: Trivial
D: The strtab section is supposed to be found using the symtab's
D: sh_link field, not by name.
===== kernel/module.c 1.32 vs edited =====
--- 1.32/kernel/module.c Thu Dec 19 18:19:53 2002
+++ edited/kernel/module.c Thu Dec 26 12:44:00 2002
@@ -1010,6 +979,9 @@
/* Internal symbols */
DEBUGP("Symbol table in section %u\n", i);
symindex = i;
+ /* Strings */
+ strindex = sechdrs[i].sh_link;
+ DEBUGP("String table found in section %u\n", strindex);
} else if (strcmp(secstrings+sechdrs[i].sh_name,
".gnu.linkonce.modname") == 0) {
/* This module's name */
@@ -1024,11 +1000,6 @@
/* Exported symbols. */
DEBUGP("EXPORT table in section %u\n", i);
exportindex = i;
- } else if (strcmp(secstrings + sechdrs[i].sh_name, ".strtab")
- == 0) {
- /* Strings */
- DEBUGP("String table found in section %u\n", i);
- strindex = i;
} else if (strcmp(secstrings+sechdrs[i].sh_name, "__param")
== 0) {
/* Setup parameter info */
-- Anyone who quotes me in their sig is an idiot. -- Rusty Russell. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue Dec 31 2002 - 22:00:10 EST