@@ -392,14 +392,6 @@ If you do not specify a @var{member}, all files in the archive
392392are extracted.
393393
394394Files cannot be extracted from a thin archive.
395-
396- @item -- help
397- Displays the list of command line options supported by @command {ar }
398- and then exits.
399-
400- @item -- version
401- Displays the version information of @command {ar } and then exits.
402-
403395@end table
404396
405397A number of modifiers (@var {mod }) may immediately follow the @var {p }
@@ -527,22 +519,55 @@ when the modifier @samp{v} is appended.
527519This modifier shows the version number of @command {ar }.
528520@end table
529521
522+ The @command {ar } program also supports some command line options which
523+ are neither modifiers nor actions, but which do change its behaviour
524+ in specific ways:
525+
526+ @table @samp
527+ @item -- help
528+ Displays the list of command line options supported by @command {ar }
529+ and then exits.
530+
531+ @item -- version
532+ Displays the version information of @command {ar } and then exits.
533+
534+ @item -X32_64
530535@command {ar } ignores an initial option spelt @samp {-X32_64 }, for
531536compatibility with AIX. The behaviour produced by this option is the
532- default for @sc {gnu } @command {ar }. @command {ar } does not support any of the other
533- @samp {-X } options; in particular, it does not support @option { -X32 }
534- which is the default for AIX @command {ar }.
537+ default for @sc {gnu } @command {ar }. @command {ar } does not support any
538+ of the other @samp {-X } options; in particular, it does not support
539+ @option { -X32 } which is the default for AIX @command {ar }.
535540
536- The optional command line switch @option {--plugin } @var {name } causes
541+ @item -- plugin @var {name }
542+ @cindex plugins
543+ The optional command line switch @option {--plugin @var {name }} causes
537544@command {ar } to load the plugin called @var {name } which adds support
538- for more file formats. This option is only available if the toolchain
539- has been built with plugin support enabled.
540-
541- The optional command line switch @option {--target } @var {bfdname }
545+ for more file formats, including object files with link-time
546+ optimization information.
547+
548+ This option is only available if the toolchain has been built with
549+ plugin support enabled.
550+
551+ If @option {--plugin } is not provided, but plugin support has been
552+ enabled then @command {ar } iterates over the files in
553+ @file {$ @{ libdir @} /bfd-plugins } in alphabetic order and the first
554+ plugin that claims the object in question is used.
555+
556+ Please note that this plugin search directory is @emph {not } the one
557+ used by @command {ld }'s @option {-plugin } option. In order to make
558+ @command {ar } use the linker plugin it must be copied into the
559+ @file {$ @{ libdir @} /bfd-plugins } directory. For GCC based compilations
560+ the linker plugin is called @file {liblto_plugin.so.0.0.0 }. For Clang
561+ based compilations it is called @file {LLVMgold.so }. The GCC plugin
562+ is always backwards compatible with earlier versions, so it is
563+ sufficient to just copy the newest one.
564+
565+ @item -- target @var {target }
566+ The optional command line switch @option {--target @var {bfdname }}
542567specifies that the archive members are in an object code format
543568different from your system's default format. See
544569@xref {Target Selection }, for more information.
545-
570+ @end table
546571@c man end
547572
548573@ignore
@@ -1006,11 +1031,25 @@ to @option{-X 32}, which is not supported by @sc{gnu} @command{nm}.
10061031Display only defined symbols for each object file.
10071032
10081033@item -- plugin @var {name }
1009- @cindex load plugin
1034+ @cindex plugins
10101035Load the plugin called @var {name } to add support for extra target
10111036types. This option is only available if the toolchain has been built
10121037with plugin support enabled.
10131038
1039+ If @option {--plugin } is not provided, but plugin support has been
1040+ enabled then @command {nm } iterates over the files in
1041+ @file {$ @{ libdir @} /bfd-plugins } in alphabetic order and the first
1042+ plugin that claims the object in question is used.
1043+
1044+ Please note that this plugin search directory is @emph {not } the one
1045+ used by @command {ld }'s @option {-plugin } option. In order to make
1046+ @command {nm } use the linker plugin it must be copied into the
1047+ @file {$ @{ libdir @} /bfd-plugins } directory. For GCC based compilations
1048+ the linker plugin is called @file {liblto_plugin.so.0.0.0 }. For Clang
1049+ based compilations it is called @file {LLVMgold.so }. The GCC plugin
1050+ is always backwards compatible with earlier versions, so it is
1051+ sufficient to just copy the newest one.
1052+
10141053@item -- size-sort
10151054Sort symbols by size. For ELF objects symbol sizes are read from the
10161055ELF, for other object types the symbol sizes are computed as the
0 commit comments