This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Not so minor a fix for --enable-targets=all
- From: Alan Modra <amodra at gmail dot com>
- To: Hans-Peter Nilsson <hp at bitrange dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, binutils at sourceware dot org
- Date: Mon, 4 Feb 2013 13:11:18 +1030
- Subject: Re: Not so minor a fix for --enable-targets=all
- References: <87d2wvvemw.fsf@fleche.redhat.com> <20130124002126.GV3244@bubble.grove.modra.org> <87pq0vs49d.fsf@fleche.redhat.com> <20130124030019.GW3244@bubble.grove.modra.org> <878v7ipjic.fsf@fleche.redhat.com> <20130124221554.GA3244@bubble.grove.modra.org> <20130126021157.GE3244@bubble.grove.modra.org> <alpine.BSF.2.02.1302031625510.98450@arjuna.pair.com>
On Sun, Feb 03, 2013 at 04:32:44PM -0500, Hans-Peter Nilsson wrote:
> > * mmo.c (mmo_scan): Clear abfd->symcount.
>
> ...shouldn't this rather be done in generic code? Just thinking
> that the backend code should be able to assume the bfd is a
> clean slate and this seems like having to initialize seemingly
> random fields.
Yes. When I saw the testsuite failures, I assumed mmo was the only
backend needing to zero abfd->symcount, but on looking some more I see
other backends, eg. tekhex, have the same problem. What's more,
abfd->symcount ought to be preserved. In fact, every bfd field
changed by an unsuccessful call to a target object_p function ought to
be preserved, except of course those that reflect file
position/caching. I don't have the time to implement this right now.
--
Alan Modra
Australia Development Lab, IBM