Bug 24431 Treat __ksymtab as int32_t for v4.19+ kernels
authormaennich@google.com <maennich@google.com>
Fri, 10 May 2019 01:00:41 +0000 (02:00 +0100)
committerDodji Seketeli <dodji@redhat.com>
Fri, 10 May 2019 05:34:45 +0000 (07:34 +0200)
commit9402e26a8fd3046ede57d241f646fcb50385aaeb
treef5e16cd1f0d66a46923557e5c9d36e4bec0e3ed6
parenta8bec92de2c956547bba10efea7480f33f398687
Bug 24431 Treat __ksymtab as int32_t for v4.19+ kernels

Calculating the relocation for values in __ksymtab with GElf_Addr (i.e.
uint64_t), makes the calculation rely on overflows for negative offsets.
Address that by treating these as 32bit signed values for the v4.19+
__ksymtabs and calculate the offset with them. This also allows, similar
an earlier commit, to drop the distinction between 64bit and 32bit
kernels.

* src/abg-dwarf-reader.cc (maybe_adjust_sym_address_from_v4_19_ksymtab):
treat passed addr as 32bit signed offset in case of v4.19+ __ksymtabs

Signed-off-by: Matthias Maennich <maennich@google.com>
src/abg-dwarf-reader.cc