]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Update description of the -plugin option used by the linker, ar and nm.
authorDilyan Palauzov <dilyan.palauzov@aegee.org>
Fri, 27 Jan 2017 13:20:24 +0000 (13:20 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 27 Jan 2017 13:20:24 +0000 (13:20 +0000)
PR 20343
ld * ld.texinfo (Options): Extend documentation of the --plugin
option.  Include a description of where the plugins should be
located.

binutils* doc/binutils.texi (ar): Extend documentation of the --plugin
option.  Include a description of where the plugins should be
located.
(nm): Likewise.

binutils/ChangeLog
binutils/doc/binutils.texi
ld/ChangeLog
ld/ld.texinfo

index 90e876773fe32494cb45ae5b435f77f5e2e0e062..a7344337291e1f235792e9735b49f43df7200e00 100644 (file)
@@ -1,3 +1,12 @@
+2017-01-27  Dilyan Palauzov  <dilyan.palauzov@aegee.org>
+           Nick Clifton  <nickc@redhat.com>
+
+       PR 20343
+       * doc/binutils.texi (ar): Extend documentation of the --plugin
+       option.  Include a description of where the plugins should be
+       located.
+       (nm): Likewise.
+
 2017-01-23  Nick Clifton  <nickc@redhat.com>
 
        * MAINTAINERS: Add Bernd to Past Maintainers section.
index 0a2c4c6ab408d7236eefdd93d7f4f9d033b9fc40..534560a4953241f3e664ad7581bafa17f7b54359 100644 (file)
@@ -392,14 +392,6 @@ If you do not specify a @var{member}, all files in the archive
 are extracted.
 
 Files cannot be extracted from a thin archive.
-
-@item --help
-Displays the list of command line options supported by @command{ar}
-and then exits.
-
-@item --version
-Displays the version information of @command{ar} and then exits.
-
 @end table
 
 A number of modifiers (@var{mod}) may immediately follow the @var{p}
@@ -527,22 +519,55 @@ when the modifier @samp{v} is appended.
 This modifier shows the version number of @command{ar}.
 @end table
 
+The @command{ar} program also supports some command line options which
+are neither modifiers nor actions, but which do change its behaviour
+in specific ways:
+
+@table @samp
+@item --help
+Displays the list of command line options supported by @command{ar}
+and then exits.
+
+@item --version
+Displays the version information of @command{ar} and then exits.
+
+@item -X32_64
 @command{ar} ignores an initial option spelt @samp{-X32_64}, for
 compatibility with AIX.  The behaviour produced by this option is the
-default for @sc{gnu} @command{ar}.  @command{ar} does not support any of the other
-@samp{-X} options; in particular, it does not support @option{-X32}
-which is the default for AIX @command{ar}.
+default for @sc{gnu} @command{ar}.  @command{ar} does not support any
+of the other @samp{-X} options; in particular, it does not support
+@option{-X32} which is the default for AIX @command{ar}.
 
-The optional command line switch @option{--plugin} @var{name} causes
+@item --plugin @var{name}
+@cindex plugins
+The optional command line switch @option{--plugin @var{name}} causes 
 @command{ar} to load the plugin called @var{name} which adds support
-for more file formats.  This option is only available if the toolchain
-has been built with plugin support enabled.
-
-The optional command line switch @option{--target} @var{bfdname}
+for more file formats, including object files with link-time
+optimization information.
+
+This option is only available if the toolchain has been built with
+plugin support enabled.
+
+If @option{--plugin} is not provided, but plugin support has been
+enabled then @command{ar} iterates over the files in
+@file{$@{libdir@}/bfd-plugins} in alphabetic order and the first
+plugin that claims the object in question is used.
+
+Please note that this plugin search directory is @emph{not} the one
+used by @command{ld}'s @option{-plugin} option.  In order to make
+@command{ar} use the  linker plugin it must be copied into the
+@file{$@{libdir@}/bfd-plugins} directory.  For GCC based compilations
+the linker plugin is called @file{liblto_plugin.so.0.0.0}.  For Clang
+based compilations it is called @file{LLVMgold.so}.  The GCC plugin
+is always backwards compatible with earlier versions, so it is
+sufficient to just copy the newest one.
+
+@item --target @var{target}
+The optional command line switch @option{--target @var{bfdname}}
 specifies that the archive members are in an object code format
 different from your system's default format.  See
 @xref{Target Selection}, for more information.
-
+@end table
 @c man end
 
 @ignore
@@ -1006,11 +1031,25 @@ to @option{-X 32}, which is not supported by @sc{gnu} @command{nm}.
 Display only defined symbols for each object file.
 
 @item --plugin @var{name}
-@cindex load plugin
+@cindex plugins
 Load the plugin called @var{name} to add support for extra target
 types.  This option is only available if the toolchain has been built
 with plugin support enabled.
 
+If @option{--plugin} is not provided, but plugin support has been
+enabled then @command{nm} iterates over the files in
+@file{$@{libdir@}/bfd-plugins} in alphabetic order and the first
+plugin that claims the object in question is used.
+
+Please note that this plugin search directory is @emph{not} the one
+used by @command{ld}'s @option{-plugin} option.  In order to make
+@command{nm} use the  linker plugin it must be copied into the
+@file{$@{libdir@}/bfd-plugins} directory.  For GCC based compilations
+the linker plugin is called @file{liblto_plugin.so.0.0.0}.  For Clang
+based compilations it is called @file{LLVMgold.so}.  The GCC plugin
+is always backwards compatible with earlier versions, so it is
+sufficient to just copy the newest one.
+
 @item --size-sort
 Sort symbols by size.  For ELF objects symbol sizes are read from the
 ELF, for other object types the symbol sizes are computed as the
index b3ca916925737eaecea6f651f900ba70d390e0e1..5501e2f526550d3945c7ad37e9a69da384954a81 100644 (file)
@@ -1,3 +1,11 @@
+2017-01-27  Dilyan Palauzov  <dilyan.palauzov@aegee.org>
+           Nick Clifton  <nickc@redhat.com>
+
+       PR 20343
+       * ld.texinfo (Options): Extend documentation of the --plugin
+       option.  Include a description of where the plugins should be
+       located.
+
 2017-01-27  Nick Clifton  <nickc@redhat.com>
 
        * po/sr.po: New Serbian translation.
index 29c2131a2b12ceec21277b5271423be0df38246f..2ce7560f2296bfc5a77b717b6e27bc75a83d9a53 100644 (file)
@@ -828,6 +828,22 @@ the linker may make more use of this option.  Also currently there is
 no difference in the linker's behaviour for different non-zero values
 of this option.  Again this may change with future releases.
 
+@kindex -plugin @var{name}
+@item -plugin @var{name}
+Involve a plugin in the linking process.  The @var{name} parameter is
+the absolute filename of the plugin.  Usually this parameter is
+automatically added by the complier, when using link time
+optimization, but users can also add their own plugins if they so
+wish.
+
+Note that the location of the compiler originated plugins is different
+from the place where the @command{ar}, @command{nm} and
+@command{ranlib} programs search for their plugins.  In order for
+those commands to make use of a compiler based plugin it must first be
+copied into the @file{$@{libdir@}/bfd-plugins} directory.  All gcc
+based linker plugins are backward compatible, so it is sufficient to
+just copy in the newest one. 
+
 @kindex --push-state
 @cindex push state governing input file handling
 @item --push-state