Free linker hash table from bfd_close

Alan Modra amodra@gmail.com
Thu Jun 19 00:58:00 GMT 2014


On Wed, Jun 18, 2014 at 02:54:55PM -0600, Tom Tromey wrote:
> After rebasing our branch didn't compile, because
> bfd_link_hash_table_free and bfd_link_hash_table_create don't exist any
> more.

bfd_link_hash_table_create is still available.

> I worked around it for now by calling the _bfd_generic variants.  This
> is ugly, though, since presumably those functions are given the leading
> underscore to indicate that they are private to BFD.

If you want to continue using bfd_link_hash_table_create, then your
cleanup should run:

  if (abfd->is_linker_output)
    (*abfd->link.hash->hash_table_free) (abfd);

However, I think you're going to be sorely disappointed in the
linker's ability to relocate final linked binaries.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list