aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/kallsyms.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2005-05-05 19:15:09 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-05 19:36:31 -0400
commit075d6eb16d273dab7b7b4b83fcee8bce4ee387ed (patch)
treed5e2cfb21dd752410649a675f2bb2a7c0db05c8e /kernel/kallsyms.c
parentbecf3aec2608d6807a58d0677661cb23c388d67f (diff)
[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 1627f8d6e0cd..13bcec151b57 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -46,6 +46,14 @@ static inline int is_kernel_inittext(unsigned long addr)
46 return 0; 46 return 0;
47} 47}
48 48
49static inline int is_kernel_extratext(unsigned long addr)
50{
51 if (addr >= (unsigned long)_sextratext
52 && addr <= (unsigned long)_eextratext)
53 return 1;
54 return 0;
55}
56
49static inline int is_kernel_text(unsigned long addr) 57static inline int is_kernel_text(unsigned long addr)
50{ 58{
51 if (addr >= (unsigned long)_stext && addr <= (unsigned long)_etext) 59 if (addr >= (unsigned long)_stext && addr <= (unsigned long)_etext)
@@ -169,8 +177,9 @@ const char *kallsyms_lookup(unsigned long addr,
169 namebuf[0] = 0; 177 namebuf[0] = 0;
170 178
171 if ((all_var && is_kernel(addr)) || 179 if ((all_var && is_kernel(addr)) ||
172 (!all_var && (is_kernel_text(addr) || is_kernel_inittext(addr)))) { 180 (!all_var && (is_kernel_text(addr) || is_kernel_inittext(addr) ||
173 unsigned long symbol_end=0; 181 is_kernel_extratext(addr)))) {
182 unsigned long symbol_end = 0;
174 183
175 /* do a binary search on the sorted kallsyms_addresses array */ 184 /* do a binary search on the sorted kallsyms_addresses array */
176 low = 0; 185 low = 0;