3 @@ -613,10 +613,12 @@ static noinline_for_stack
4 char *symbol_string(char *buf, char *end, void *ptr,
5 struct printf_spec spec, const char *fmt)
7 +#ifndef CONFIG_KALLSYMS
11 -#ifdef CONFIG_KALLSYMS
12 char sym[KSYM_SYMBOL_LEN];
17 ptr = __builtin_extract_return_addr(ptr);
18 @@ -630,13 +632,15 @@ char *symbol_string(char *buf, char *end
20 sprint_symbol_no_offset(sym, value);
22 - return string(buf, end, sym, spec);
24 - spec.field_width = 2 * sizeof(void *);
25 - spec.flags |= SPECIAL | SMALL | ZEROPAD;
27 + len = snprintf(sym, sizeof(sym), "0x%lx", value);
29 + mod = __module_address(value);
31 + snprintf(sym + len, sizeof(sym) - len, " [%s@%p+0x%x]",
32 + mod->name, mod->module_core, mod->core_size);
34 - return number(buf, end, value, spec);
35 + return string(buf, end, sym, spec);