We dont' want GCC to dispose or reuse phdr2_mem stack memory while phdr2
is pointing to it.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
+2015-06-18 Mark Wielaard <mjw@redhat.com>
+
+ * readelf.c (print_phdr): Make sure phdr2_mem lifetime/scope equals
+ phdr2 pointer.
+
2015-06-18 Mark Wielaard <mjw@redhat.com>
* readelf.c (handle_gnu_hash): Free lengths on invalid_data.
{
/* Determine the segment this section is part of. */
size_t cnt2;
+ GElf_Phdr phdr2_mem;
GElf_Phdr *phdr2 = NULL;
for (cnt2 = 0; cnt2 < phnum; ++cnt2)
{
- GElf_Phdr phdr2_mem;
phdr2 = gelf_getphdr (ebl->elf, cnt2, &phdr2_mem);
if (phdr2 != NULL && phdr2->p_type == PT_LOAD