libdwfl: elf_from_remote_memory only trust shdrs of last file-only segment.

If the last PT_LOAD segment that contains the whole shdrs also extends
the segment in memory beyond the end of file the program might be reusing
the memory space that we expect the shdrs to be in. Don't trust the shdrs
are valid in that case.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
2 files changed