This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Fix for strip/objcopy and empty archives
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Tom Rix <trix at redhat dot com>
- Cc: binutils at sources dot redhat dot com, "Christopher C. Chimelis" <chris at debian dot org>
- Date: Wed, 19 Dec 2001 17:42:56 +1030
- Subject: Re: Fix for strip/objcopy and empty archives
- References: <Pine.LNX.4.21.0112110155270.24927-100000@spawn.hockeyfiend.com> <20011218221956.M29130@bubble.sa.bigpond.net.au> <3C20322C.6A9EF43E@redhat.com>
On Wed, Dec 19, 2001 at 12:22:36AM -0600, Tom Rix wrote:
> Alan Modra wrote:
>
> > Anyone know why bfd_set_format was being set inside the object copying
> > loop? As it was, objcopy/strip bombed on empty archives.
>
> This patch will break xcoff.
>
> Aix archives can contain non object files.
That's true of most 'ar' utilities.
> Aix also supports an achive format <bigaf> that mixes 32 and 64 bit objects.
>
> So checking the format inside the loop is the right thing to do.
You'll need to convince me that setting bfd_format outside the loop
_for the new archive_ is wrong. My patch doesn't change anything to do
with the archive components. Hmm, I suppose I'd better boot AIX.
Alan