diff options
Diffstat (limited to 'tools/include/linux/kallsyms.h')
| -rw-r--r-- | tools/include/linux/kallsyms.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/include/linux/kallsyms.h b/tools/include/linux/kallsyms.h index 582cc1e5f3a4..f61a01dd7eb7 100644 --- a/tools/include/linux/kallsyms.h +++ b/tools/include/linux/kallsyms.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _LIBLOCKDEP_LINUX_KALLSYMS_H_ #define _LIBLOCKDEP_LINUX_KALLSYMS_H_ @@ -5,7 +6,7 @@ #include <stdio.h> #include <unistd.h> -#define KSYM_NAME_LEN 128 +#define KSYM_NAME_LEN 512 struct module; @@ -17,9 +18,10 @@ static inline const char *kallsyms_lookup(unsigned long addr, return NULL; } +#ifdef HAVE_BACKTRACE_SUPPORT #include <execinfo.h> #include <stdlib.h> -static inline void print_ip_sym(unsigned long ip) +static inline void print_ip_sym(const char *loglvl, unsigned long ip) { char **name; @@ -29,5 +31,8 @@ static inline void print_ip_sym(unsigned long ip) free(name); } +#else +static inline void print_ip_sym(const char *loglvl, unsigned long ip) {} +#endif #endif |
