2013-01-07 Roland McGrath <roland@hack.frob.com>
+ * elf_getarsym.c (elf_getarsym): Copy FILE_DATA into stack space if it
+ would be unaligned and !ALLOW_UNALIGNED.
+
* elf_getarsym.c (read_number_entries): Use memcpy instead of pointer
dereference so as not to assume the field is naturally aligned.
else
{
file_data = (void *) (elf->map_address + off);
+ if (!ALLOW_UNALIGNED
+ && ((uintptr_t) file_data & -(uintptr_t) n) != 0)
+ file_data = memcpy (alloca (sz), elf->map_address + off, sz);
str_data = (char *) (elf->map_address + off + sz);
}