Change in 'ar' behaviour
Ian Lance Taylor
ian@wasabisystems.com
Wed Aug 11 16:16:00 GMT 2004
<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
More information about the Binutils
mailing list