
ar(1) | ar(1) |
f1 f3 f2 f4
Note that the relative order of f2 and f3 has not changed. The second command says "move f3 after f2 in newlib.a", creating the order:
f1 f2 f3 f4
The third command then replaces ®les f2 and f3. Since ®les f2 and f3 both already existed in the archive, this sequence of commands could not be simply replaced by:
ar ra f1 newlib.a f2 f3
because the previous position and relative order of f2 and f3 in the archive are preserved (no matter how the ®les are speci®ed on the command line), producing the following archive:
newlib.a: f3' f2' f1 f4
WARNINGS
If you are a user who has appropriate privileges, ar can alter any archive ®le, even if it is
If the same ®le is mentioned twice in an argument list, it might be put in the archive twice.
If multiple copies of a ®le exist in an archive, ar matches the ®rst occurrence of the ®le in the archive.
ar automatically creates an archive symbol table, a task performed in early
FILES | Temporary ®les |
/var/tmp/ar* | |
SEE ALSO |
|
System Tools: |
|
ld(1) | Invoke the link editor |
Miscellaneous: |
|
acl(5) | Access control lists |
a.out(4) | Assembler, compiler, and linker output |
ar(4) | Archive format |
lorder(1) | Find the ordering relation for object ®les or archive libraries |
ranlib(1) | Regenerate an archive symbol table |
strip(1) | Strip symbol and line number information from an object ®le |
tmpnam(3S) | Create a name for a temporary ®le |
Texts and Tutorials:
(See manuals(5) for ordering information)
STANDARDS CONFORMANCE
ar: SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2
a
− 4 − | Section 1−23 |