+2012-07-17 Petr Machata <pmachata@redhat.com>
+
+ * elf32_xlatetom.c (elfw2(LIBELFBITS, xlatetom)): Do not check for
+ integer number of records in case of ELF_T_NHDR.
+
2012-04-02 Mark Wielaard <mjw@redhat.com>
* elf32_offscn.c: Do not match SHT_NOBITS sections at OFFSET unless
/* Convert from file to memory representation.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2012 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
#endif
- if (src->d_size % recsize != 0)
+ /* We shouldn't require integer number of records when processing
+ notes. Payload bytes follow the header immediately, it's not an
+ array of records as is the case otherwise. */
+ if (src->d_type != ELF_T_NHDR
+ && src->d_size % recsize != 0)
{
__libelf_seterrno (ELF_E_INVALID_DATA);
return NULL;