Fix for strip/objcopy and empty archives

Alan Modra amodra@bigpond.net.au
Wed Dec 19 00:04:00 GMT 2001


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



More information about the Binutils mailing list