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 11:20:52 -0400
- Subject: Re: Change in 'ar' behaviour
- References: <jen012hz5i.fsf@sykes.suse.de> <411A2DCA.4040606@qnx.com>
Jeff Baker <jbaker@qnx.com> writes:
> > Yes, this is what POSIX says:
> > All file operands can be pathnames. However, files within archives
> > shall
> > be named by a filename, which is the last component of the pathname
> > used
> > when the file was entered into the archive. The comparison of file
> > operands to the names of files in archives shall be performed by
> > comparing the last component of the operand to the name of the file in
> > the archive.
>
> So let's say you have a static library that contains multiple objects
> with the same name that reside in different sub directories. If you
> want the library to contain both of these objects, and you want each
> object to be updated if it changes, but you don't want to reconstruct
> the whole archive every build because it's huge, how would you do that?
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.
Ian