The ar(1) manual page defines several XSI shaded extensions relating to
the placement of files within an archive, notably -a, -b, -i, -m, and,
to a lesser extent, -q.
I can fathom no reason for these extensions, except by contstruing the
following model of linking from an archive:
do
for each object file in archive _in the order the object files
are stored in the archive_
if the object file contains any definitions of
unresolved references
add the object file to the output
while any object file was added during the last pass
Historically, has this been the implemented model? Does the model still
hold in the presence of an archive symbol table? If so, would it make
sense to codify this, XSI shaded, in the description of c99?
I suspect that this model is not viable for dynamically shared objects
and the dynamic linker, but the facility is useful for static libraries.
Konrad Schwarz
|