modpost: add a helper to get data pointed by a symbol
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 14 Nov 2019 17:42:21 +0000 (02:42 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 23 Nov 2019 03:44:24 +0000 (12:44 +0900)
commitafa0459daa7b08c7b2c879705b69d39b734a11d0
tree68d221aea26c4a920b4871e64c4913fde978d75f
parent7ecaf069da52e472d393f03e79d721aabd724166
modpost: add a helper to get data pointed by a symbol

When CONFIG_MODULE_REL_CRCS is enabled, the value of __crc_* is not
an absolute value, but the address to the CRC data embedded in the
.rodata section.

Getting the data pointed by the symbol value is somewhat complex.
Split it out into a new helper, sym_get_data().

I will reuse it to refactor namespace_from_kstrtabns() in the next
commit.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
scripts/mod/modpost.c