mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Trivial patch for module.c: Strtab by sh_link field.
@ 2002-12-27 10:23 Rusty Russell
  0 siblings, 0 replies; only message in thread
From: Rusty Russell @ 2002-12-27 10:23 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, rth, trivial

[ 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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-12-27 10:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-27 10:23 [PATCH] Trivial patch for module.c: Strtab by sh_link field Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®