aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-06-12 11:59:22 +0930
committerAlan Modra <amodra@gmail.com>2021-06-12 12:01:26 +0930
commit8c60e272c73b8021601f6e091879bc0fa1c5ab45 (patch)
treeb35a887a818fb7738ff5a7e32d3ddf7aa38ec0af /binutils
parente331b18d42d38fa4542f4c50536717a43546290b (diff)
downloadgdb-8c60e272c73b8021601f6e091879bc0fa1c5ab45.zip
gdb-8c60e272c73b8021601f6e091879bc0fa1c5ab45.tar.gz
gdb-8c60e272c73b8021601f6e091879bc0fa1c5ab45.tar.bz2
readelf: don't clear section_headers in process_file_header
* readelf.c (process_file_header): Don't clear section_headers.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/readelf.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index fcf6056..1297d27 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,9 @@
2021-06-12 Alan Modra <amodra@gmail.com>
+ * readelf.c (process_file_header): Don't clear section_headers.
+
+2021-06-12 Alan Modra <amodra@gmail.com>
+
* readelf.c (get_section_headers): Don't test e_shoff here, leave
that to get_32bit_section_headers or get_64bit_section_headers.
(process_object): Throw away section header read to print file
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 4217ea3..79724e0 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -5237,8 +5237,6 @@ process_file_header (Filedata * filedata)
header->e_shstrndx = filedata->section_headers[0].sh_link;
if (header->e_shstrndx >= header->e_shnum)
header->e_shstrndx = SHN_UNDEF;
- free (filedata->section_headers);
- filedata->section_headers = NULL;
}
return true;