diff options
Diffstat (limited to 'common/kallsyms.c')
-rw-r--r-- | common/kallsyms.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/common/kallsyms.c b/common/kallsyms.c index e15dec5dfc..3c5904f8a8 100644 --- a/common/kallsyms.c +++ b/common/kallsyms.c @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: GPL-2.0-only + #include <common.h> #include <init.h> #include <kallsyms.h> @@ -15,7 +17,7 @@ extern const unsigned long kallsyms_markers[] __attribute__((weak)); static inline int is_kernel_text(unsigned long addr) { - if ((addr >= (unsigned long)_stext && addr <= (unsigned long)_etext)) + if (addr >= (unsigned long)_stext && addr <= (unsigned long)_end) return 1; return 0; } @@ -163,10 +165,10 @@ static unsigned long get_symbol_pos(unsigned long addr, * It resides in a module. * - We also guarantee that modname will be valid until rescheduled. */ -static const char *kallsyms_lookup(unsigned long addr, - unsigned long *symbolsize, - unsigned long *offset, - char **modname, char *namebuf) +const char *kallsyms_lookup(unsigned long addr, + unsigned long *symbolsize, + unsigned long *offset, + char **modname, char *namebuf) { namebuf[KSYM_NAME_LEN - 1] = 0; namebuf[0] = 0; |