Commit f846aa92 authored by Richard Henderson's avatar Richard Henderson Committed by Linus Torvalds

[PATCH] Trivial patch for module.c: Strtab by sh_link field.

The strtab section is supposed to be found using the symtab's
sh_link field, not by name.
parent bfafc871
......@@ -1001,6 +1001,9 @@ static struct module *load_module(void *umod,
/* 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.this_module") == 0) {
/* The module struct */
......@@ -1011,11 +1014,6 @@ static struct module *load_module(void *umod,
/* 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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment