Two runtime asserts in gelf_getnote() compare sizeof GElf_Nhdr with
Elf32_Ndhr and Elf64_Nhdr. This can be done at compile time using
eu_static_assert.
Signed-off-by: Aaron Merey <amerey@redhat.com>
/* It's easy to handle this type. It has the same size for 32 and
64 bit objects. */
- assert (sizeof (GElf_Nhdr) == sizeof (Elf32_Nhdr));
- assert (sizeof (GElf_Nhdr) == sizeof (Elf64_Nhdr));
+ eu_static_assert (sizeof (GElf_Nhdr) == sizeof (Elf32_Nhdr));
+ eu_static_assert (sizeof (GElf_Nhdr) == sizeof (Elf64_Nhdr));
rwlock_rdlock (((Elf_Data_Scn *) data)->s->elf->lock);