Make bfd.link_next field a union

Michael Eager eager@eagerm.com
Fri Jun 13 16:33:00 GMT 2014


On 06/13/14 02:48, Alan Modra wrote:
> This is the first of four patches aimed at fixing PR17047, a problem
> that arose from people fussing over the linker not freeing the main
> hash table before exit.  In hindsight, I probably should have just
> reverted the original patch and HP's more recent fix..
>
> The link_next field of struct bfd is currently only used to chain
> together linker input files.  This patch prepares to use the field to
> stash the linker hash table, which is always created on the linker
> output file.

Is there a reason not to create a link_hash field, rather than
overload/reuse link_next?  I've never been fond of using unions
to store unrelated data.


-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077



More information about the Binutils mailing list