From: Keith Owens <kaos@sgi.com>
To: linux-kernel@vger.kernel.org
Cc: Paulo Marques <pmarques@grupopie.com>
Subject: [patch 2.6.15 v2] Tell kallsyms_lookup_name() to ignore type U entries
Date: Sun, 08 Jan 2006 14:10:50 +1100 [thread overview]
Message-ID: <32183.1136689850@ocs3.ocs.com.au> (raw)
In-Reply-To: Your message of "Fri, 06 Jan 2006 15:18:46 -0000." <43BE8A56.2070500@grupopie.com>
When one module exports a function symbol and another module uses that
symbol then kallsyms shows the symbol twice. Once from the consumer
with a type of 'U' and once from the provider with a type of 't' or
'T'. On most architectures, both entries have the same address so it
does not matter which one is returned by kallsyms_lookup_name(). But
on architectures with function descriptors, the 'U' entry points to the
descriptor, not to the code body, which is not what we want.
IA64 # grep -w qla2x00_remove_one /proc/kallsyms
a000000208c25ef8 U qla2x00_remove_one [qla2300] <= descriptor
a000000208bf44c0 t qla2x00_remove_one [qla2xxx] <= function body
Tell kallsyms_lookup_name() to ignore type U entries in modules.
Signed-off-by: Keith Owens <kaos@sgi.com>
---
module.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: linux/kernel/module.c
===================================================================
--- linux.orig/kernel/module.c 2006-01-06 12:58:52.841135060 +1100
+++ linux/kernel/module.c 2006-01-06 12:59:03.438308825 +1100
@@ -2050,7 +2050,8 @@ static unsigned long mod_find_symname(st
unsigned int i;
for (i = 0; i < mod->num_symtab; i++)
- if (strcmp(name, mod->strtab+mod->symtab[i].st_name) == 0)
+ if (strcmp(name, mod->strtab+mod->symtab[i].st_name) == 0 &&
+ mod->symtab[i].st_info != 'U')
return mod->symtab[i].st_value;
return 0;
}
prev parent reply other threads:[~2006-01-08 3:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-06 5:36 [patch 2.6.15] " Keith Owens
2006-01-06 15:18 ` Paulo Marques
2006-01-08 3:10 ` Keith Owens [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=32183.1136689850@ocs3.ocs.com.au \
--to=kaos@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pmarques@grupopie.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®