diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/kallsyms.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index 82de2fb62cb7..00c1801099fa 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h | |||
| @@ -83,16 +83,6 @@ __attribute__((format(printf,1,2))); | |||
| 83 | static inline void __check_printsym_format(const char *fmt, ...) | 83 | static inline void __check_printsym_format(const char *fmt, ...) |
| 84 | { | 84 | { |
| 85 | } | 85 | } |
| 86 | /* ia64 and ppc64 use function descriptors, which contain the real address */ | ||
| 87 | #if defined(CONFIG_IA64) || defined(CONFIG_PPC64) | ||
| 88 | #define print_fn_descriptor_symbol(fmt, addr) \ | ||
| 89 | do { \ | ||
| 90 | unsigned long *__faddr = (unsigned long*) addr; \ | ||
| 91 | print_symbol(fmt, __faddr[0]); \ | ||
| 92 | } while (0) | ||
| 93 | #else | ||
| 94 | #define print_fn_descriptor_symbol(fmt, addr) print_symbol(fmt, addr) | ||
| 95 | #endif | ||
| 96 | 86 | ||
| 97 | static inline void print_symbol(const char *fmt, unsigned long addr) | 87 | static inline void print_symbol(const char *fmt, unsigned long addr) |
| 98 | { | 88 | { |
| @@ -101,6 +91,20 @@ static inline void print_symbol(const char *fmt, unsigned long addr) | |||
| 101 | __builtin_extract_return_addr((void *)addr)); | 91 | __builtin_extract_return_addr((void *)addr)); |
| 102 | } | 92 | } |
| 103 | 93 | ||
| 94 | /* | ||
| 95 | * Pretty-print a function pointer. | ||
| 96 | * | ||
| 97 | * ia64 and ppc64 function pointers are really function descriptors, | ||
| 98 | * which contain a pointer the real address. | ||
| 99 | */ | ||
| 100 | static inline void print_fn_descriptor_symbol(const char *fmt, void *addr) | ||
| 101 | { | ||
| 102 | #if defined(CONFIG_IA64) || defined(CONFIG_PPC64) | ||
| 103 | addr = *(void **)addr; | ||
| 104 | #endif | ||
| 105 | print_symbol(fmt, (unsigned long)addr); | ||
| 106 | } | ||
| 107 | |||
| 104 | #ifndef CONFIG_64BIT | 108 | #ifndef CONFIG_64BIT |
| 105 | #define print_ip_sym(ip) \ | 109 | #define print_ip_sym(ip) \ |
| 106 | do { \ | 110 | do { \ |
