modpost: factor out inst location calculation to section_rel()
authorMasahiro Yamada <masahiroy@kernel.org>
Tue, 20 Jun 2023 12:05:19 +0000 (21:05 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 25 Jun 2023 14:12:20 +0000 (23:12 +0900)
commitb31db651f745604371e4d3304f5b16fc3d9d0110
tree36d60c81ffa78e5dafc2c069ad20653226030ab4
parent25a21fbb934a0d989e1858f83c2ddf4cfb2ebe30
modpost: factor out inst location calculation to section_rel()

All the addend_*_rel() functions calculate the instruction location in
the same way.

Factor out the similar code to the caller. Squash reloc_location() too.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/mod/modpost.c