aboutsummaryrefslogtreecommitdiff
path: root/binutils/doc/binutils.texi
diff options
context:
space:
mode:
authorHoward Chu <hyc@symas.com>2020-11-03 15:12:47 +0000
committerNick Clifton <nickc@redhat.com>2020-11-03 15:12:47 +0000
commitf3016d6ce178b76002edde12c30ebe7f608a8e21 (patch)
treec8c1943182747f75bafa7c34c4b7562ea7dfbbce /binutils/doc/binutils.texi
parentfd65497db4098140490e59e3dbf4709da5536081 (diff)
downloadgdb-f3016d6ce178b76002edde12c30ebe7f608a8e21.zip
gdb-f3016d6ce178b76002edde12c30ebe7f608a8e21.tar.gz
gdb-f3016d6ce178b76002edde12c30ebe7f608a8e21.tar.bz2
Add an option to the archiver to add a section recording library dependencies.
* ar.c (long_options): Add --record-libdeps. (usage): Mention the new option. (decode_options): Handle the new option. (replace_members): If necessary, create a bfd to hold the libdeps description. * binemul.c (ar_emul_append_bfd): New function. (ar_emul_replace_bfd): New function. (ar_emul_default_append): Replace file_name and target arguments with new_bfd argument. (ar_emul_default_replace): Likewise. * binemul.h: Update prototypes. (struct bin_emulation_xfer_struct): Update fields. * doc/binutils.texi: Document the new option. * NEWS: Mention the new feature. * emul_aix.c (ar_emul_aix_append): Update. (ar_emul_aix_replace): Likewise. * testsuite/binutils-all/ar.exp: Add test of new feature.
Diffstat (limited to 'binutils/doc/binutils.texi')
-rw-r--r--binutils/doc/binutils.texi19
1 files changed, 15 insertions, 4 deletions
diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi
index 6203fde..41fd92a 100644
--- a/binutils/doc/binutils.texi
+++ b/binutils/doc/binutils.texi
@@ -170,7 +170,7 @@ in the section entitled ``GNU Free Documentation License''.
@c man title ar create, modify, and extract from archives
@smallexample
-ar [-]@var{p}[@var{mod}] [@option{--plugin} @var{name}] [@option{--target} @var{bfdname}] [@option{--output} @var{dirname}] [@var{relpos}] [@var{count}] @var{archive} [@var{member}@dots{}]
+ar [-]@var{p}[@var{mod}] [@option{--plugin} @var{name}] [@option{--target} @var{bfdname}] [@option{--output} @var{dirname}] [@option{--record-libdeps} @var{libdeps}] [@var{relpos}] [@var{count}] @var{archive} [@var{member}@dots{}]
ar -M [ <mri-script ]
@end smallexample
@@ -196,7 +196,9 @@ characters (typical of formats related to coff).
@cindex libraries
@command{ar} is considered a binary utility because archives of this sort
are most often used as @dfn{libraries} holding commonly needed
-subroutines.
+subroutines. Since libraries often will depend on other libraries,
+@command{ar} can also record the dependencies of a library when the
+@option{--record-libdeps} option is specified.
@cindex symbol index
@command{ar} creates an index to the symbols defined in relocatable
@@ -254,7 +256,7 @@ program.
@smallexample
@c man begin SYNOPSIS ar
-ar [@option{-X32_64}] [@option{-}]@var{p}[@var{mod}] [@option{--plugin} @var{name}] [@option{--target} @var{bfdname}] [@option{--output} @var{dirname}] [@var{relpos}] [@var{count}] @var{archive} [@var{member}@dots{}]
+ar [@option{-X32_64}] [@option{-}]@var{p}[@var{mod}] [@option{--plugin} @var{name}] [@option{--target} @var{bfdname}] [@option{--output} @var{dirname}] [@option{--record-libdeps} @var{libdeps}] [@var{relpos}] [@var{count}] @var{archive} [@var{member}@dots{}]
@c man end
@end smallexample
@@ -448,9 +450,14 @@ member must be present as the @var{relpos} argument, before the
@var{archive} specification. (same as @samp{b}).
@item l
-This modifier is accepted but not used.
+@c This modifier was accepted but not used.
@c whaffor ar l modifier??? presumably compat; with
@c what???---doc@@cygnus.com, 25jan91
+Specify dependencies of this library. The dependencies must immediately
+follow this option character, must use the same syntax as the linker
+command line, and must be specified within a single argument. I.e., if
+multiple items are needed, they must be quoted to form a single command
+line argument. For example @samp{L "-L/usr/local/lib -lmydep1 -lmydep2"}
@item N
Uses the @var{count} parameter. This is used if there are multiple
@@ -592,6 +599,10 @@ Note - although the presence of this option does imply a @option{x}
extraction operation that option must still be included on the command
line.
+@item --record-libdeps @var{libdeps}
+The @option{--record-libdeps} option is identical to the @option{l} modifier,
+just handled in long form.
+
@end table
@c man end