readelf: move file related static vars to filedata
authorAlan Modra <amodra@gmail.com>
Wed, 22 Apr 2020 05:19:39 +0000 (14:49 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 22 Apr 2020 11:32:50 +0000 (21:02 +0930)
commit978c4450511aece71d9de03ecb3ad805257f00e0
tree185e81d93ff09d9e37258fd9fee1698e184e77d2
parent6431e4096805b68f7cc4a17002c34ccd40f7dde2
readelf: move file related static vars to filedata

The idea here is to get rid of a lot of file related static vars used
to pass data around, in order to not have stale data about one object
file persisting to the next one.

* readelf.c (archive_file_offset, archive_file_size, dynamic_addr),
(dynamic_size, dynamic_nent, dynamic_strings, dynamic_strings_length),
(num_dynamic_syms, nbuckets, nchains, buckets, chains),
(ngnubuckets, gnubuckets, gnuchains, mipsxlat, ngnuchains),
(gnusymidx, dynamic_symbols, dynamic_syminfo, dynamic_syminfo_offset),
(dynamic_syminfo_nent, program_interpreter, dynamic_info),
(dynamic_info_DT_GNU_HASH, dynamic_info_DT_MIPS_XHASH, version_info),
(dynamic_section, symtab_shndx_list, group_count, section_groups),
(section_headers_groups): Move to struct filedata.  Update use
throughout file.
binutils/ChangeLog
binutils/readelf.c