diff options
author | David Woodhouse <dwmw2@infradead.org> | 2005-05-05 16:15:09 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-05 16:36:31 -0700 |
commit | 075d6eb16d273dab7b7b4b83fcee8bce4ee387ed (patch) | |
tree | d5e2cfb21dd752410649a675f2bb2a7c0db05c8e /kernel/kallsyms.c | |
parent | becf3aec2608d6807a58d0677661cb23c388d67f (diff) | |
download | kernel-crypto-075d6eb16d273dab7b7b4b83fcee8bce4ee387ed.tar.gz kernel-crypto-075d6eb16d273dab7b7b4b83fcee8bce4ee387ed.tar.xz kernel-crypto-075d6eb16d273dab7b7b4b83fcee8bce4ee387ed.zip |
[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.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c index 1627f8d6e0c..13bcec151b5 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; |