libelf: Correct alignment of ELF_T_GNUHASH data for ELFCLASS64
authorMark Wielaard <mark@klomp.org>
Wed, 23 Mar 2022 00:20:56 +0000 (01:20 +0100)
committerMark Wielaard <mark@klomp.org>
Wed, 23 Mar 2022 00:20:56 +0000 (01:20 +0100)
commit4b77a7682f4c1489e1527ec86e3fddb1d25da1a1
treee65a5a970e25c3aa6ff732a18623cde0f84c140a
parent2785ba7ad21e3f28949c7333d48412122ebbcfa2
libelf: Correct alignment of ELF_T_GNUHASH data for ELFCLASS64

ELF_T_GNUHASH data is just 32bit words for ELFCLASS32. But for
ELFCLASS64 it is a mix of 32bit and 64bit words. In the
elf_cvt_gnuhash function we rely on the alignment of the whole to be
64bit word aligned, even though the first 4 words are
32bits. Otherwise we might try to convert an unaligned 64bit word.

Signed-off-by: Mark Wielaard <mark@klomp.org>
libelf/ChangeLog
libelf/elf_getdata.c