]> git.ipfire.org Git - thirdparty/elfutils.git/commit
gelf_update_move.c: Handle ELFCLASS32 and ELFCLASS64 separately
authorAaron Merey <amerey@redhat.com>
Fri, 13 Mar 2026 21:46:48 +0000 (17:46 -0400)
committerAaron Merey <amerey@redhat.com>
Fri, 13 Mar 2026 21:46:48 +0000 (17:46 -0400)
commit95889f8212395be69acd17b2628290fdc6819ddc
tree01e04b19f09eebaf8a304f20b730570d2713daf0
parent41f6a36a940ae2f3c12aa84935988f85dcef1049
gelf_update_move.c: Handle ELFCLASS32 and ELFCLASS64 separately

Similar to commit c460e2088, gelf_update_move does not distinguish
between ELFCLASS32 and ELFCLASS64 binaries.

The code assumes that Elf32_Move and Elf64_Move structs are the same
size but they are not. The m_info and m_poffset fields have type
uint32_t for Elf32_Move but uint64_t for Elf64_Move.

Fix this by handling ELFCLASS32 and ELFCLASS64 cases separately.

Signed-off-by: Aaron Merey <amerey@redhat.com>
libelf/gelf_update_move.c