diff options
Diffstat (limited to 'include/linux/kallsyms.h')
-rw-r--r-- | include/linux/kallsyms.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index 54e2549f96ba..849043ce4ed6 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h | |||
@@ -57,10 +57,25 @@ do { \ | |||
57 | #define print_fn_descriptor_symbol(fmt, addr) print_symbol(fmt, addr) | 57 | #define print_fn_descriptor_symbol(fmt, addr) print_symbol(fmt, addr) |
58 | #endif | 58 | #endif |
59 | 59 | ||
60 | #define print_symbol(fmt, addr) \ | 60 | static inline void print_symbol(const char *fmt, unsigned long addr) |
61 | do { \ | 61 | { |
62 | __check_printsym_format(fmt, ""); \ | 62 | __check_printsym_format(fmt, ""); |
63 | __print_symbol(fmt, addr); \ | 63 | __print_symbol(fmt, (unsigned long) |
64 | __builtin_extract_return_addr((void *)addr)); | ||
65 | } | ||
66 | |||
67 | #ifndef CONFIG_64BIT | ||
68 | #define print_ip_sym(ip) \ | ||
69 | do { \ | ||
70 | printk("[<%08lx>]", ip); \ | ||
71 | print_symbol(" %s\n", ip); \ | ||
64 | } while(0) | 72 | } while(0) |
73 | #else | ||
74 | #define print_ip_sym(ip) \ | ||
75 | do { \ | ||
76 | printk("[<%016lx>]", ip); \ | ||
77 | print_symbol(" %s\n", ip); \ | ||
78 | } while(0) | ||
79 | #endif | ||
65 | 80 | ||
66 | #endif /*_LINUX_KALLSYMS_H*/ | 81 | #endif /*_LINUX_KALLSYMS_H*/ |