readelf info leaks from one object to the next
authorAlan Modra <amodra@gmail.com>
Fri, 11 Jun 2021 03:19:02 +0000 (12:49 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 11 Jun 2021 04:53:18 +0000 (14:23 +0930)
commit066f8fbede55e781c6241c445e0940f8368d0ef9
treee2141dd7c4da7a99e434bde0d122ada74d99487f
parent4de91c10cdd9f5818599578667802320df305d72
readelf info leaks from one object to the next

A number of filedata entries were not cleared.  Make sure they are
all cleared out, except the ones needed for archive handling.

* readelf.c (struct filedata): Move archive_file_offset and
archive_file_size earlier.
(free_filedata): Clear using memset.
binutils/ChangeLog
binutils/readelf.c