dwarf2.c remove varinfo and funcinfo sec field
authorAlan Modra <amodra@gmail.com>
Wed, 21 Sep 2022 05:15:06 +0000 (14:45 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 21 Sep 2022 06:25:10 +0000 (15:55 +0930)
commit6c0cf2ca0db6748edec00a2293541f95464268a0
tree5be9cba686720655de421698aaf66f1ad9a325d1
parente472ec9fad6d7b0da914da606430e249d1bd99e4
dwarf2.c remove varinfo and funcinfo sec field

The "sec" field in these structures is only set and used in lookup
functions.  It always starts off as NULL.  So the only possible effect
of the field is to modify the return of the lookup, which was its
purpose back in 2005 when HJ fixed PR990.  Since then we solved the
problem of relocatable object files with the fix for PR2338, so this
field is now redundant.

* dwarf.c (struct funcinfo, struct varinfo): Remove "sec" field.
(lookup_symbol_in_function_table): Don't set or test "sec".
(lookup_symbol_in_variable_table): Likewise.
(info_hash_lookup_funcinfo, info_hash_lookup_varinfo): Likewise.
bfd/dwarf2.c