symtab: fix getting CRC in relocatable modules
authorAleksei Vetrov <vvvvvv@google.com>
Sat, 28 Jan 2023 00:08:18 +0000 (00:08 +0000)
committerDodji Seketeli <dodji@redhat.com>
Tue, 31 Jan 2023 10:02:10 +0000 (11:02 +0100)
commitdbd6db18226835108ce464446abe2ea25b1c1206
tree8b484d0f4ceff4528bee22c8bbe989f9bcc6890a
parentbea35c980063a697ff8984ca36455b49a03ebc69
symtab: fix getting CRC in relocatable modules

In ELF with ET_REL type symbol value holds not absolute but relative to
section value. This patch applies adjustment to the address, used in CRC
value extraction.

* src/abg-elf-helpers.cc (get_crc_for_symbol): Rename
crc_symbol_value to crc_symbol_address and adjust it for
relocatable ELF types.

Signed-off-by: Aleksei Vetrov <vvvvvv@google.com>
src/abg-elf-helpers.cc