[Crash-utility] Why module's global symbol cannot be displayed in crash? [ARM]
Dave Anderson
anderson at redhat.com
Mon Mar 25 17:47:40 UTC 2013
----- Original Message -----
> > KSYMS_START gets set during session initialization when parsing the base kernel
> > symbols from the vmlinux file in symtab_init()/store_symbols(), and it could never
> > get reset.
>
> OK, thanks for the clarification. Then I guess we can do something like the
> below patch? I'm not exactly sure if we can use ec->st_info below but it looks
> like arm_verify_symbol() doesn't use that anyway.
>
> diff --git a/symbols.c b/symbols.c
> index 4fb397c..10085be 100755
> --- a/symbols.c
> +++ b/symbols.c
> @@ -2004,6 +2004,14 @@ store_module_kallsyms_v2(struct load_module
> *lm, int start, int curr,
> if (*nameptr == '\0')
> continue;
>
> + /*
> + * On ARM we have linker mapping symbols like '$a' and '$d'.
> + * Make sure that these don't end up into our symbol list.
> + */
> + if (machine_type("ARM") &&
> + !machdep->verify_symbol(nameptr, ec->st_value, ec->st_info))
> + continue;
> +
> if (CRASHDEBUG(7))
> fprintf(fp,
> "%s: st_name: %ld st_value: %lx st_shndx: %ld st_info:
> %c\n",
>
Queued for crash-6.1.5.
Thanks,
Dave
More information about the Crash-utility
mailing list