This is the mail archive of the binutils@sources.redhat.com 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]

Re: [rfa:] Save/restore bug for section info in elf_object_p.


On Tue, 26 Sep 2000, Hans-Peter Nilsson wrote:

> However, elf_object_p has bugs when getting no-match signalled as late as
> from elf_backend_object_p, visible when it is called multiple times, both
> with failure-then-success and vice versa.  It boils down to that sections
> are blindly linked into abfd, and are not restored on error.  Note that
> with and without this patch, there is a perceived memory leak in case of
> multiple recognized formats, but as mentioned, that'd be ambiguous format
> recognition, an error situation.

Does this fix go far enough?  ie. Are there other things in the bfd that
should be restored on a failure?  Would it be safer to make a copy of the
bfd, and restore the whole thing on a mis-match?  If you have considered
these issues, I have no objection to you committing your patch.

Alan Modra
-- 
Linuxcare.  Support for the Revolution.


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