lkml.org 
[lkml]   [2003]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] fix for kallsyms module symbol resolution problem
From
Date
In lots of KALLSYMS symbol resolution in modules, I've noticed the
appearance of symbols with no names:

Jun 27 20:55:26 raven kernel: [<10131440>] schedule_timeout+0x78/0xdc
Jun 27 20:55:26 raven kernel: [<000f8240>] +0x4e0/0x598 [sunrpc]
Jun 27 20:55:26 raven kernel: [<0014504c>] +0x150/0x43c [nfsd]
Jun 27 20:55:26 raven kernel: [<10109c5c>] ret_from_kernel_thread+0x1c/0x24

The problem seems to be that get_ksymbol doesn't eliminate empty symbol
names when it does resolution. The attached patch should fix this.

James

===== kernel/module.c 1.87 vs edited =====
--- 1.87/kernel/module.c Sat Jun 14 11:16:06 2003
+++ edited/kernel/module.c Fri Jun 27 22:10:58 2003
@@ -1760,7 +1760,8 @@
continue;

if (mod->symtab[i].st_value <= addr
- && mod->symtab[i].st_value > mod->symtab[best].st_value)
+ && mod->symtab[i].st_value > mod->symtab[best].st_value
+ && *(mod->strtab + mod->symtab[i].st_name) != '\0')
best = i;
if (mod->symtab[i].st_value > addr
&& mod->symtab[i].st_value < nextval)
\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.059 / U:3.984 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site