Red Hat ENTERPRISE LINUX 4 - USING BINUTILS Uživatelský manuál Strana 12

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 80
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 11
6 Chapter 2. ar
This option will cause gnu ar to match file names using a complete path name, which can be
convenient when extracting a single file from an archive created by another tool.
s
Write an object-file index into the archive, or update an existing one, even if no other change is
made to the archive. You may use this modifier flag either with any operation, or alone. Running
ar s on an archive is equivalent to running ranlib on it.
S
Do not generate an archive symbol table. This can speed up building a large library in several
steps. The resulting archive can not be used with the linker. In order to build a symbol table, you
must omit the S modifier on the last execution of ar, or you must run ranlib on the archive.
u
Normally, ar r. . . inserts all files listed into the archive. If you would like to insert only those of
the files you list that are newer than existing members of the same names, use this modifier. The
u modifier is allowed only for the operation r (replace). In particular, the combination qu is not
allowed, since checking the timestamps would lose any speed advantage from the operation q.
v
This modifier requests the verbose version of an operation. Many operations display additional
information, such as filenames processed, when the modifier v is appended.
V
This modifier shows the version number of ar.
ar ignores an initial option spelt -X32_64, for compatibility with AIX. The behaviour produced by
this option is the default for gnu ar. ar does not support any of the other -X options; in particular, it
does not support -X32 which is the default for AIX ar.
2.2. Controlling arwith a Script
ar -M [
script ]
If you use the single command-line option -M with ar, you can control its operation with a rudimen-
tary command language. This form of ar operates interactively if standard input is coming directly
from a terminal. During interactive use, ar prompts for input (the prompt is AR ), and continues
executing even after errors. If you redirect standard input to a script file, no prompts are issued, and
ar abandons execution (with a nonzero exit code) on any error.
The ar command language is not designed to be equivalent to the command-line options; in fact,
it provides somewhat less control over archives. The only purpose of the command language is to
ease the transition to gnu ar for developers who already have scripts written for the MRI "librarian"
program.
The syntax for the ar command language is straightforward:
commands are recognized in upper or lower case; for example, LIST is the same as list. In the
following descriptions, commands are shown in upper case for clarity.
a single command may appear on each line; it is the first word on the line.
empty lines are allowed, and have no effect.
Zobrazit stránku 11
1 2 ... 7 8 9 10 11 12 13 14 15 16 17 ... 79 80

Komentáře k této Příručce

Žádné komentáře