aboutsummaryrefslogtreecommitdiff
path: root/binutils/readelf.c
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r--binutils/readelf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 1456c03..4217ea3 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -5859,9 +5859,6 @@ get_section_headers (Filedata *filedata, bool probe)
if (filedata->section_headers != NULL)
return true;
- if (filedata->file_header.e_shoff == 0)
- return true;
-
if (is_32bit_elf)
return get_32bit_section_headers (filedata, probe);
else
@@ -21361,6 +21358,11 @@ process_object (Filedata * filedata)
goto out;
}
+ /* Throw away the single section header read above, so that we
+ re-read the entire set. */
+ free (filedata->section_headers);
+ filedata->section_headers = NULL;
+
if (! process_section_headers (filedata))
{
/* Without loaded section headers we cannot process lots of things. */