diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-11-24 01:04:35 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-11-25 21:03:33 +0900 |
commit | 29e55ad3d5f50eca6f8762749da85d6fa1250061 (patch) | |
tree | 87bea5c6a8ef1c9a652a51dcf3a05086e59af031 /lib/test_hexdump.c | |
parent | c5e5002f3603e01f50d8d61878a4ca8ffca7bd15 (diff) |
scripts/kallsyms: add sym_name() to mitigate cast ugliness
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: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'lib/test_hexdump.c')
0 files changed, 0 insertions, 0 deletions