bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/20343] Document how to use LTO


From: dilyan.palauzov at aegee dot org
Subject: [Bug binutils/20343] Document how to use LTO
Date: Sat, 07 Jan 2017 17:36:15 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=20343

--- Comment #11 from dilyan.palauzov at aegee dot org <dilyan.palauzov at aegee 
dot org> ---
diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi
index 0a2c4c6ab4..d7b3657aa0 100644
--- a/binutils/doc/binutils.texi
+++ b/binutils/doc/binutils.texi
@@ -534,9 +534,17 @@ default for @sc{gnu} @command{ar}.  @command{ar} does not
support any of the oth
 which is the default for AIX @command{ar}.

 The optional command line switch @option{--plugin} @var{name} causes
address@hidden 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.
address@hidden to load the plugin called @var{name} which adds support 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, @command{ar} iterates
+over the files in address@hidden@}/bfd-plugins in alphabetic order and the 
first
+plugin that claims the object in question is used. Please note, that the
+implicit search path is not identical to the one used by @command{ld}
address@hidden  To make @command{ar} consider implicitly the linker plugin,
+copy it to address@hidden@}/bfd-plugins.  For GCC the plugin is
address@hidden, for Clang - @file{LLVMgold.so}.  The GCC plugin
+is backwards compatible, so it is sufficient to have just the newest one.

 The optional command line switch @option{--target} @var{bfdname}
 specifies that the archive members are in an object code format
@@ -1009,7 +1017,14 @@ Display only defined symbols for each object file.
 @cindex load plugin
 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.
+with plugin support enabled.  If @option{--plugin} is not provided,
address@hidden iterates over the files in address@hidden@}/bfd-plugins in
alphabetical
+order and the first plugin that claims the object is used.  Please note, that
+the plugin path is not identical to the one used by @command{ld}
address@hidden  To make @command{nm} consider implicitly the linker plugin,
+copy it to address@hidden@}/bfd-plugins.  For GCC the plugin is
@file{liblto_plugin.so.0.0.0}, for Clang - @file{LLVMgold.so}.  The
+GCC plugin is backwards compatible, so it is sufficient to have just the
newest
+one.

 @item --size-sort
 Sort symbols by size.  For ELF objects symbol sizes are read from the
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index 29c2131a2b..ce2137c209 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -828,6 +828,16 @@ 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.

address@hidden -plugin @var{linker-plugin}
address@hidden -plugin @var{linker-plugin}
+Involve a plugin in the linking process.  This parameter is automatically
added
+by the complier, when using link time optimization, and contains the absolute
+file name the the plugin, where the installation process has put it.  Note,
that
+the path is different from the place, where
address@hidden/@command{nm}/@command{ranlib} search implicitly for the linker
+plugin.  All gcc linker plugins are backward compatible, it is sufficient to
+have just the newest one.
+
 @kindex --push-state
 @cindex push state governing input file handling
 @item --push-state

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]