This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Free linker hash table from bfd_close


>>>>> "Alan" == Alan Modra <amodra@gmail.com> writes:

Alan> 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.

Alan> 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.

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

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

Thanks!

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

I think we're only relocating .o files.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]