* size: (binutils)size. List section sizes and total size.
* strings: (binutils)strings. List printable strings from files.
* strip: (binutils)strip. Discard symbols.
-* elfedit: (binutils)elfedit. Update the ELF header of ELF files.
+* elfedit: (binutils)elfedit. Update ELF header and property of ELF files.
* windmc: (binutils)windmc. Generator for Windows message resources.
* windres: (binutils)windres. Manipulate Windows resources.
@end direntry
Discard symbols
@item elfedit
-Update the ELF header of ELF files.
+Update the ELF header and program property of ELF files.
@item c++filt
Demangle encoded C++ symbols (on MS-DOS, this program is named
* windres:: Manipulate Windows resources
* dlltool:: Create files needed to build and use DLLs
* readelf:: Display the contents of ELF format files
-* elfedit:: Update the ELF header of ELF files
+* elfedit:: Update ELF header and property of ELF files
* Common Options:: Command-line options for all utilities
* Selecting the Target System:: How these utilities determine the target
* Reporting Bugs:: Reporting Bugs
This modifier shows the version number of @command{ar}.
@end table
-The @command{ar} program also supports some command line options which
+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}
+Displays the list of command-line options supported by @command{ar}
and then exits.
@item --version
@item --plugin @var{name}
@cindex plugins
-The optional command line switch @option{--plugin @var{name}} causes
+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, including object files with link-time
optimization information.
sufficient to just copy the newest one.
@item --target @var{target}
-The optional command line switch @option{--target @var{bfdname}}
+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.
[@option{--localize-hidden}]
[@option{-L} @var{symbolname}|@option{--localize-symbol=}@var{symbolname}]
[@option{--globalize-symbol=}@var{symbolname}]
+ [@option{--globalize-symbols=}@var{filename}]
[@option{-W} @var{symbolname}|@option{--weaken-symbol=}@var{symbolname}]
[@option{-w}|@option{--wildcard}]
[@option{-x}|@option{--discard-all}]
[@option{--strip-unneeded-symbols=}@var{filename}]
[@option{--keep-global-symbols=}@var{filename}]
[@option{--localize-symbols=}@var{filename}]
- [@option{--globalize-symbols=}@var{filename}]
[@option{--weaken-symbols=}@var{filename}]
[@option{--add-symbol} @var{name}=[@var{section}:]@var{value}[,@var{flags}]]
[@option{--alt-machine-code=}@var{index}]
remove the section '.text.foo'.
@item --remove-relocations=@var{sectionpattern}
-Remove relocations from the output file for any section matching
-@var{sectionpattern}. This option may be given more than once. Note
-that using this option inappropriately may make the output file
-unusable. Wildcard characters are accepted in @var{sectionpattern}.
+Remove non-dynamic relocations from the output file for any section
+matching @var{sectionpattern}. This option may be given more than
+once. Note that using this option inappropriately may make the output
+file unusable, and attempting to remove a dynamic relocation section
+such as @samp{.rela.plt} from an executable or shared library with
+@option{--remove-relocations=.plt} will not work. Wildcard characters
+are accepted in @var{sectionpattern}.
For example:
@smallexample
--remove-relocations=.text.*
@end smallexample
-will remove the relocations for all sections matching the patter
+will remove the relocations for all sections matching the pattern
'.text.*'.
If the first character of @var{sectionpattern} is the exclamation
@itemx --keep-global-symbol=@var{symbolname}
Keep only symbol @var{symbolname} global. Make all other symbols local
to the file, so that they are not visible externally. This option may
-be given more than once.
+be given more than once. Note: this option cannot be used in
+conjunction with the @option{--globalize-symbol} or
+@option{--globalize-symbols} options.
@item --localize-hidden
In an ELF object, mark all symbols that have hidden or internal visibility
@item --globalize-symbol=@var{symbolname}
Give symbol @var{symbolname} global scoping so that it is visible
outside of the file in which it is defined. This option may be given
-more than once.
+more than once. Note: this option cannot be used in conjunction with
+the @option{-G} or @option{--keep-global-symbol} options.
@item -w
@itemx --wildcard
Apply @option{--globalize-symbol} option to each symbol listed in the file
@var{filename}. @var{filename} is simply a flat file, with one symbol
name per line. Line comments may be introduced by the hash character.
-This option may be given more than once.
+This option may be given more than once. Note: this option cannot be
+used in conjunction with the @option{-G} or @option{--keep-global-symbol}
+options.
@item --weaken-symbols=@var{filename}
Apply @option{--weaken-symbol} option to each symbol listed in the file
to create these files is as follows:
@enumerate
-@item Link the executable as normal. Assuming that is is called
+@item Link the executable as normal. Assuming that it is called
@code{foo} then...
@item Run @code{objcopy --only-keep-debug foo foo.dbg} to
create a file containing the debugging info.
[@option{-R}|@option{--dynamic-reloc}]
[@option{-s}|@option{--full-contents}]
[@option{-W[lLiaprmfFsoRtUuTgAckK]}|
- @option{--dwarf}[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links]
+ @option{--dwarf}[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links]]
[@option{-G}|@option{--stabs}]
[@option{-t}|@option{--syms}]
[@option{-T}|@option{--dynamic-syms}]
special QuarkSE-EM instructions, @option{fpuda} selects the printing
of double precision assist instructions, @option{fpus} selects the
printing of FPU single precision FP instructions, while @option{fpud}
-selects the printing of FPU souble precision FP instructions.
+selects the printing of FPU double precision FP instructions.
Additionally, one can choose to have all the immediates printed in
hexadecimal using @option{hex}. By default, the short immediates are
printed using the decimal representation, while the long immediate
@c man begin OPTIONS size
-The command line options have the following meanings:
+The command-line options have the following meanings:
@table @env
@item -A
reading from stdin then it will always display all of the printable
sequences that it can find.
-For backwards compatibility any file that occurs after a command line
+For backwards compatibility any file that occurs after a command-line
option of just @option{-} will also be scanned in full, regardless of
the presence of any @option{-d} option.
to create these files is as follows:
@enumerate
-@item Link the executable as normal. Assuming that is is called
+@item Link the executable as normal. Assuming that it is called
@code{foo} then...
@item Run @code{objcopy --only-keep-debug foo foo.dbg} to
create a file containing the debugging info.
names from the standard input instead. All the results are printed on
the standard output. The difference between reading names from the
command line versus reading names from the standard input is that
-command line arguments are expected to be just mangled names and no
+command-line arguments are expected to be just mangled names and no
checking is performed to separate them from surrounding text. Thus
for example:
@item -H
@itemx --help
-Displays a list of command line options and then exits.
+Displays a list of command-line options and then exits.
@item -m @var{characters}
@itemx --maxlength @var{characters}
@command{dlltool} builds the library file by hand, but it builds the
exports file by creating temporary files containing assembler statements
-and then assembling these. The @option{-S} command line option can be
+and then assembling these. The @option{-S} command-line option can be
used to specify the path to the assembler that dlltool will use,
and the @option{-f} option can be used to pass specific flags to that
assembler. The @option{-n} can be used to prevent dlltool from deleting
@c man begin OPTIONS dlltool
-The command line options have the following meanings:
+The command-line options have the following meanings:
@table @env
@item -f @var{options}
@itemx --as-flags @var{options}
-Specifies any specific command line options to be passed to the
+Specifies any specific command-line options to be passed to the
assembler when building the exports file. This option will work even if
the @option{-S} option is not used. This option only takes one argument,
and if it occurs more than once on the command line, then later
@item -h
@itemx --help
-Displays a list of command line options and then exits.
+Displays a list of command-line options and then exits.
@item -V
@itemx --version
@cindex unwind information
Displays the contents of the file's unwind section, if it has one. Only
the unwind sections for IA64 ELF files, as well as ARM unwind tables
-(@code{.ARM.exidx} / @code{.ARM.extab}) are currently supported.
+(@code{.ARM.exidx} / @code{.ARM.extab}) are currently supported. If
+support is not yet implemented for your architecture you could try
+dumping the contents of the @var{.eh_frames} section using the
+@option{--debug-dump=frames} or @option{--debug-dump=frames-interp}
+options.
@item -d
@itemx --dynamic
@item -H
@itemx --help
-Display the command line options understood by @command{readelf}.
+Display the command-line options understood by @command{readelf}.
@end table
@cindex Update ELF header
@kindex elfedit
-@c man title elfedit Update the ELF header of ELF files.
+@c man title elfedit Update ELF header and program property of ELF files.
@smallexample
@c man begin SYNOPSIS elfedit
@option{--output-mach=}@var{machine}
@option{--output-type=}@var{type}
@option{--output-osabi=}@var{osabi}
+ @option{--enable-x86-feature=}@var{feature}
+ @option{--disable-x86-feature=}@var{feature}
[@option{-v}|@option{--version}]
[@option{-h}|@option{--help}]
@var{elffile}@dots{}
@c man begin DESCRIPTION elfedit
-@command{elfedit} updates the ELF header of ELF files which have
-the matching ELF machine and file types. The options control how and
-which fields in the ELF header should be updated.
+@command{elfedit} updates the ELF header and program property of ELF
+files which have the matching ELF machine and file types. The options
+control how and which fields in the ELF header and program property
+should be updated.
@var{elffile}@dots{} are the ELF files to be updated. 32-bit and
64-bit ELF files are supported, as are archives containing ELF files.
The long and short forms of options, shown here as alternatives, are
equivalent. At least one of the @option{--output-mach},
-@option{--output-type} and @option{--output-osabi} options must be given.
+@option{--output-type}, @option{--output-osabi},
+@option{--enable-x86-feature} and @option{--disable-x86-feature}
+options must be given.
@table @env
Change the ELF OSABI in the ELF header to @var{osabi}. The
supported ELF OSABI are the same as @option{--input-osabi}.
+@item --enable-x86-feature=@var{feature}
+Set the @var{feature} bit in program property in @var{exec} or @var{dyn}
+ELF files with machine types of @var{i386} or @var{x86-64}. The
+supported features are, @var{ibt} and @var{shstk}.
+
+@item --disable-x86-feature=@var{feature}
+Clear the @var{feature} bit in program property in @var{exec} or
+@var{dyn} ELF files with machine types of @var{i386} or @var{x86-64}.
+The supported features are the same as @option{--enable-x86-feature}.
+
+Note: @option{--enable-x86-feature} and @option{--disable-x86-feature}
+are available only on hosts with @samp{mmap} support.
+
@item -v
@itemx --version
Display the version number of @command{elfedit}.
@item -h
@itemx --help
-Display the command line options understood by @command{elfedit}.
+Display the command-line options understood by @command{elfedit}.
@end table
@enumerate
@item
-command line option: @option{-b} or @option{--target}
+command-line option: @option{-b} or @option{--target}
@item
environment variable @code{GNUTARGET}
@enumerate
@item
-command line options: @option{-I} or @option{--input-target}, or @option{-F} or @option{--target}
+command-line options: @option{-I} or @option{--input-target}, or @option{-F} or @option{--target}
@item
environment variable @code{GNUTARGET}
@enumerate
@item
-command line options: @option{-O} or @option{--output-target}, or @option{-F} or @option{--target}
+command-line options: @option{-O} or @option{--output-target}, or @option{-F} or @option{--target}
@item
the input target (see ``@command{objcopy} and @command{strip} Input Target'' above)
@enumerate
@item
-command line option: @option{--target}
+command-line option: @option{--target}
@item
environment variable @code{GNUTARGET}
@enumerate
@item
-command line option: @option{-m} or @option{--architecture}
+command-line option: @option{-m} or @option{--architecture}
@item
deduced from the input file