This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Change in 'ar' behaviour


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]