• M
    scripts/kallsyms: add sym_name() to mitigate cast ugliness · 29e55ad3
    Masahiro Yamada 提交于
    sym_entry::sym is (unsigned char *) instead of (char *) because
    kallsyms exploits the MSB for compression, and the characters are
    used as the index of token_profit array.
    
    However, it requires casting (unsigned char *) to (char *) in some
    places since standard library functions such as strcmp(), strlen()
    expect (char *).
    
    Introduce a new helper, sym_name(), which advances the given pointer
    by 1 and casts it to (char *).
    Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
    29e55ad3
kallsyms.c 17.9 KB