X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=binutils%2Fdoc%2Fbinutils.texi;h=6038c72a8aab9797e80471dc9f2aa7d7d5ae722b;hb=37fd5ef3ecc58caacd6abb4ace3d8b559e3db53d;hp=6353fd1fd9bfb2c4ea6d21409d55069097999020;hpb=b96fec5e9946372e442ab5fac1e3af11f4cc48ad;p=deliverable%2Fbinutils-gdb.git diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi index 6353fd1fd9..6038c72a8a 100644 --- a/binutils/doc/binutils.texi +++ b/binutils/doc/binutils.texi @@ -10,8 +10,7 @@ @copying @c man begin COPYRIGHT -Copyright @copyright{} 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +Copyright @copyright{} 1991-2016 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 @@ -44,6 +43,7 @@ section entitled ``GNU Free Documentation License''. * 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. * windmc: (binutils)windmc. Generator for Windows message resources. * windres: (binutils)windres. Manipulate Windows resources. @end direntry @@ -111,6 +111,9 @@ List printable strings from files @item strip Discard symbols +@item elfedit +Update the ELF header of ELF files. + @item c++filt Demangle encoded C++ symbols (on MS-DOS, this program is named @code{cxxfilt}) @@ -125,7 +128,7 @@ Convert object code into a Netware Loadable Module Manipulate Windows resources @item windmc -Genertor for Windows message resources +Generator for Windows message resources @item dlltool Create the files needed to build and use Dynamic Link Libraries @@ -142,7 +145,6 @@ in the section entitled ``GNU Free Documentation License''. * objcopy:: Copy and translate object files * objdump:: Display information from object files * ranlib:: Generate index to archive contents -* readelf:: Display the contents of ELF format files * size:: List section sizes and total size * strings:: List printable strings from files * strip:: Discard symbols @@ -150,9 +152,11 @@ in the section entitled ``GNU Free Documentation License''. * cxxfilt: c++filt. MS-DOS name for c++filt * addr2line:: Convert addresses to file and line * nlmconv:: Converts object code into an NLM -* windres:: Manipulate Windows resources * windmc:: Generator for Windows message resources +* 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 * Common Options:: Command-line options for all utilities * Selecting the Target System:: How these utilities determine the target * Reporting Bugs:: Reporting Bugs @@ -170,7 +174,7 @@ in the section entitled ``GNU Free Documentation License''. @c man title ar create, modify, and extract from archives @smallexample -ar [@option{--plugin} @var{name}] [-]@var{p}[@var{mod} [@var{relpos}] [@var{count}]] @var{archive} [@var{member}@dots{}] +ar [-]@var{p}[@var{mod}] [@option{--plugin} @var{name}] [@option{--target} @var{bfdname}] [@var{relpos}] [@var{count}] @var{archive} [@var{member}@dots{}] ar -M [ }. These numbers are -called ordinal numbers and they represent another way of accessing the -function in a DLL, other than by name. +Specifies that @samp{@@} suffixes should be omitted from the names +of stdcall functions that will be imported from the DLL. This is +useful when creating an import library for a DLL which exports stdcall +functions but without the usual @samp{@@} symbol name suffix. + +This does not change the naming of symbols provided by the import library +to programs linked against it, but only the entries in the import table +(ie the .idata section). @item -A @itemx --add-stdcall-alias @@ -3799,20 +4451,31 @@ The result is going to be named @var{name}@code{.exe}. @item @code{LIBRARY} @var{name} @code{[ ,} @var{base} @code{]} The result is going to be named @var{name}@code{.dll}. +Note: If you want to use LIBRARY as name then you need to quote. Otherwise +this will fail due a necessary hack for libtool (see PR binutils/13710 for more +details). -@item @code{EXPORTS ( ( (} @var{name1} @code{[ = } @var{name2} @code{] ) | ( } @var{name1} @code{=} @var{module-name} @code{.} @var{external-name} @code{) )} +@item @code{EXPORTS ( ( (} @var{name1} @code{[ = } @var{name2} @code{] ) | ( } @var{name1} @code{=} @var{module-name} @code{.} @var{external-name} @code{) ) [ == } @var{its_name} @code{]} @item @code{[} @var{integer} @code{] [ NONAME ] [ CONSTANT ] [ DATA ] [ PRIVATE ] ) *} Declares @var{name1} as an exported symbol from the DLL, with optional ordinal number @var{integer}, or declares @var{name1} as an alias -(forward) of the function @var{external-name} in the DLL +(forward) of the function @var{external-name} in the DLL. +If @var{its_name} is specified, this name is used as string in export table. @var{module-name}. +Note: The @code{EXPORTS} has to be the last command in .def file, as keywords +are treated - beside @code{LIBRARY} - as simple name-identifiers. +If you want to use LIBRARY as name then you need to quote it. -@item @code{IMPORTS ( (} @var{internal-name} @code{=} @var{module-name} @code{.} @var{integer} @code{) | [} @var{internal-name} @code{= ]} @var{module-name} @code{.} @var{external-name} @code{) ) *} +@item @code{IMPORTS ( (} @var{internal-name} @code{=} @var{module-name} @code{.} @var{integer} @code{) | [} @var{internal-name} @code{= ]} @var{module-name} @code{.} @var{external-name} @code{) [ == ) @var{its_name} @code{]} *} Declares that @var{external-name} or the exported function whose ordinal number is @var{integer} is to be imported from the file @var{module-name}. If @var{internal-name} is specified then this is the name that the imported function will be referred to in the body of the DLL. +If @var{its_name} is specified, this name is used as string in import table. +Note: The @code{IMPORTS} has to be the last command in .def file, as keywords +are treated - beside @code{LIBRARY} - as simple name-identifiers. +If you want to use LIBRARY as name then you need to quote it. @item @code{DESCRIPTION} @var{string} Puts @var{string} into the output @file{.exp} file in the @@ -3858,6 +4521,7 @@ readelf [@option{-a}|@option{--all}] [@option{-t}|@option{--section-details}] [@option{-e}|@option{--headers}] [@option{-s}|@option{--syms}|@option{--symbols}] + [@option{--dyn-syms}] [@option{-n}|@option{--notes}] [@option{-r}|@option{--relocs}] [@option{-u}|@option{--unwind}] @@ -3868,10 +4532,13 @@ readelf [@option{-a}|@option{--all}] [@option{-x} |@option{--hex-dump=}] [@option{-p} |@option{--string-dump=}] [@option{-R} |@option{--relocated-dump=}] + [@option{-z}|@option{--decompress}] [@option{-c}|@option{--archive-index}] - [@option{-w[lLiaprmfFsoR]}| - @option{--debug-dump}[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]] - [@option{-I}|@option{-histogram}] + [@option{-w[lLiaprmfFsoRt]}| + @option{--debug-dump}[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index]] + [@option{--dwarf-depth=@var{n}}] + [@option{--dwarf-start=@var{n}}] + [@option{-I}|@option{--histogram}] [@option{-v}|@option{--version}] [@option{-W}|@option{--wide}] [@option{-H}|@option{--help}] @@ -3946,6 +4613,11 @@ Displays the detailed section information. Implies @option{-S}. @cindex ELF symbol table information Displays the entries in symbol table section of the file, if it has one. +@item --dyn-syms +@cindex ELF dynamic symbol table information +Displays the entries in dynamic symbol table section of the file, if it +has one. + @item -e @itemx --headers Display all the headers in the file. Equivalent to @option{-h -l -S}. @@ -3964,7 +4636,8 @@ Displays the contents of the file's relocation section, if it has one. @itemx --unwind @cindex unwind information Displays the contents of the file's unwind section, if it has one. Only -the unwind sections for IA64 ELF files are currently supported. +the unwind sections for IA64 ELF files, as well as ARM unwind tables +(@code{.ARM.exidx} / @code{.ARM.extab}) are currently supported. @item -d @itemx --dynamic @@ -3973,7 +4646,7 @@ Displays the contents of the file's dynamic section, if it has one. @item -V @itemx --version-info -@cindex ELF version sections informations +@cindex ELF version sections information Displays the contents of the version sections in the file, it they exist. @@ -3985,8 +4658,8 @@ is any. @item -D @itemx --use-dynamic When displaying symbols, this option makes @command{readelf} use the -symbol table in the file's dynamic section, rather than the one in the -symbols section. +symbol hash tables in the file's dynamic section, rather than the +symbol table sections. @item -x @itemx --hex-dump= @@ -4008,23 +4681,58 @@ Displays the contents of the indicated section as printable strings. A number identifies a particular section by index in the section table; any other string identifies all sections with that name in the object file. +@item -z +@itemx --decompress +Requests that the section(s) being dumped by @option{x}, @option{R} or +@option{p} options are decompressed before being displayed. If the +section(s) are not compressed then they are displayed as is. + @item -c @itemx --archive-index @cindex Archive file symbol index information -Displays the file symbol index infomation contained in the header part +Displays the file symbol index information contained in the header part of binary archives. Performs the same function as the @option{t} command to @command{ar}, but without using the BFD library. @xref{ar}. -@item -w[lLiaprmfFsoR] -@itemx --debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges] +@item -w[lLiaprmfFsoRt] +@itemx --debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index] Displays the contents of the debug sections in the file, if any are present. If one of the optional letters or words follows the switch then only data found in those specific sections will be dumped. +Note that there is no single letter option to display the content of +trace sections or .gdb_index. + Note: the @option{=decodedline} option will display the interpreted contents of a .debug_line section whereas the @option{=rawline} option dumps the contents in a raw format. +Note: the @option{=frames-interp} option will display the interpreted +contents of a .debug_frame section whereas the @option{=frames} option +dumps the contents in a raw format. + +Note: the output from the @option{=info} option can also be affected +by the options @option{--dwarf-depth} and @option{--dwarf-start}. + +@item --dwarf-depth=@var{n} +Limit the dump of the @code{.debug_info} section to @var{n} children. +This is only useful with @option{--debug-dump=info}. The default is +to print all DIEs; the special value 0 for @var{n} will also have this +effect. + +With a non-zero value for @var{n}, DIEs at or deeper than @var{n} +levels will not be printed. The range for @var{n} is zero-based. + +@item --dwarf-start=@var{n} +Print only DIEs beginning with the DIE numbered @var{n}. This is only +useful with @option{--debug-dump=info}. + +If specified, this option will suppress printing of any header +information and all DIEs before the DIE numbered @var{n}. Only +siblings and children of the specified DIE will be printed. + +This can be used in conjunction with @option{--dwarf-depth}. + @item -I @itemx --histogram Display a histogram of bucket list lengths when displaying the contents @@ -4056,6 +4764,100 @@ objdump(1), and the Info entries for @file{binutils}. @c man end @end ignore +@node elfedit +@chapter elfedit + +@cindex Update ELF header +@kindex elfedit + +@c man title elfedit Update the ELF header of ELF files. + +@smallexample +@c man begin SYNOPSIS elfedit +elfedit [@option{--input-mach=}@var{machine}] + [@option{--input-type=}@var{type}] + [@option{--input-osabi=}@var{osabi}] + @option{--output-mach=}@var{machine} + @option{--output-type=}@var{type} + @option{--output-osabi=}@var{osabi} + [@option{-v}|@option{--version}] + [@option{-h}|@option{--help}] + @var{elffile}@dots{} +@c man end +@end smallexample + +@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. + +@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. +@c man end + +@c man begin OPTIONS elfedit + +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. + +@table @env + +@item --input-mach=@var{machine} +Set the matching input ELF machine type to @var{machine}. If +@option{--input-mach} isn't specified, it will match any ELF +machine types. + +The supported ELF machine types are, @var{i386}, @var{IAMCU}, @var{L1OM}, +@var{K1OM} and @var{x86-64}. + +@item --output-mach=@var{machine} +Change the ELF machine type in the ELF header to @var{machine}. The +supported ELF machine types are the same as @option{--input-mach}. + +@item --input-type=@var{type} +Set the matching input ELF file type to @var{type}. If +@option{--input-type} isn't specified, it will match any ELF file types. + +The supported ELF file types are, @var{rel}, @var{exec} and @var{dyn}. + +@item --output-type=@var{type} +Change the ELF file type in the ELF header to @var{type}. The +supported ELF types are the same as @option{--input-type}. + +@item --input-osabi=@var{osabi} +Set the matching input ELF file OSABI to @var{osabi}. If +@option{--input-osabi} isn't specified, it will match any ELF OSABIs. + +The supported ELF OSABIs are, @var{none}, @var{HPUX}, @var{NetBSD}, +@var{GNU}, @var{Linux} (alias for @var{GNU}), +@var{Solaris}, @var{AIX}, @var{Irix}, +@var{FreeBSD}, @var{TRU64}, @var{Modesto}, @var{OpenBSD}, @var{OpenVMS}, +@var{NSK}, @var{AROS} and @var{FenixOS}. + +@item --output-osabi=@var{osabi} +Change the ELF OSABI in the ELF header to @var{osabi}. The +supported ELF OSABI are the same as @option{--input-osabi}. + +@item -v +@itemx --version +Display the version number of @command{elfedit}. + +@item -h +@itemx --help +Display the command line options understood by @command{elfedit}. + +@end table + +@c man end + +@ignore +@c man begin SEEALSO elfedit +readelf(1), and the Info entries for @file{binutils}. +@c man end +@end ignore + @node Common Options @chapter Common Options @@ -4435,7 +5237,7 @@ things without first using the debugger to find the facts. @node GNU Free Documentation License @appendix GNU Free Documentation License - + @include fdl.texi @node Binutils Index