summaryrefslogtreecommitdiffstats
path: root/kernel/kallsyms.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2005-05-05 16:15:09 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-05 16:36:31 -0700
commit075d6eb16d273dab7b7b4b83fcee8bce4ee387ed (patch)
treed5e2cfb21dd752410649a675f2bb2a7c0db05c8e /kernel/kallsyms.c
parentbecf3aec2608d6807a58d0677661cb23c388d67f (diff)
downloadop-kernel-dev-075d6eb16d273dab7b7b4b83fcee8bce4ee387ed.zip
op-kernel-dev-075d6eb16d273dab7b7b4b83fcee8bce4ee387ed.tar.gz
[PATCH] ppc32: platform-specific functions missing from kallsyms.
The PPC32 kernel puts platform-specific functions into separate sections so that unneeded parts of it can be freed when we've booted and actually worked out what we're running on today. This makes kallsyms ignore those functions, because they're not between _[se]text or _[se]inittext. Rather than teaching kallsyms about the various pmac/chrp/etc sections, this patch adds '_[se]extratext' markers for kallsyms. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/kallsyms.c')
-rw-r--r--kernel/kallsyms.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index 1627f8d..13bcec1 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -46,6 +46,14 @@ static inline int is_kernel_inittext(unsigned long addr)
return 0;
}
+static inline int is_kernel_extratext(unsigned long addr)
+{
+ if (addr >= (unsigned long)_sextratext
+ && addr <= (unsigned long)_eextratext)
+ return 1;
+ return 0;
+}
+
static inline int is_kernel_text(unsigned long addr)
{
if (addr >= (unsigned long)_stext && addr <= (unsigned long)_etext)
@@ -169,8 +177,9 @@ const char *kallsyms_lookup(unsigned long addr,
namebuf[0] = 0;
if ((all_var && is_kernel(addr)) ||
- (!all_var && (is_kernel_text(addr) || is_kernel_inittext(addr)))) {
- unsigned long symbol_end=0;
+ (!all_var && (is_kernel_text(addr) || is_kernel_inittext(addr) ||
+ is_kernel_extratext(addr)))) {
+ unsigned long symbol_end = 0;
/* do a binary search on the sorted kallsyms_addresses array */
low = 0;
OpenPOWER on IntegriCloud