This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Change in 'ar' behaviour
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: <jbaker at qnx dot com>
- Cc: <binutils at sources dot redhat dot com>
- Date: 11 Aug 2004 12:16:11 -0400
- Subject: Re: Change in 'ar' behaviour
- References: <200408111555.i7BFtUm21034@webmail.qnx.com>
<jbaker@qnx.com> writes:
> > POSIX does not provide a way to do that.
> >
> > If you create such an archive with a non-POSIX compliant ar program,
> > you would use the -P modifier, a GNU ar extension.
> >
> > I would not be opposed to extending -P to work when creating an
> > archive as well. This would require a modification to normalize() in
> > bfd/archive.c.
>
> Meaning that specifying -P when that archive is created will allow it to store
> full paths?
Yes.
> If you include like-named objects all when creating the archive then they are
> all included (ar r name.a 1/name.o 2/name.o 3/name.o). It's only when
> attempting to add/update them later on that it's a problem.
Yes, they are all included, and they are all called name.o. So, as
you say, you can no longer refer to them individually.
> On a slightly related topic... are the a and b modifiers supposed to work with
> d?
No, they aren't, although it is an interesting idea. They only apply
when adding files to the archive. They are very old options, used
before ranlib was invented, when the order of objects within the
archive affected the linker behaviour.
Ian