X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=binutils%2Fdoc%2Fbinutils.texi;fp=binutils%2Fdoc%2Fbinutils.texi;h=70003dbeba734b49d5763abc2b07a57310aadf87;hp=cc45b56723f1721d489e699b0d247e5b33637184;hb=d5da4f291af551c0b8b79e1d4a9b173d60e5c10e;hpb=7b5ea4fcdf2819e070665ab5610f8b48e3867c10 diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi index cc45b56..70003db 100644 --- a/binutils/doc/binutils.texi +++ b/binutils/doc/binutils.texi @@ -1,43 +1,20 @@ \input texinfo @c -*- Texinfo -*- @setfilename binutils.info -@c Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 -@c Free Software Foundation, Inc. +@settitle @sc{gnu} Binary Utilities +@finalout +@synindex ky cp @c man begin INCLUDE @include bfdver.texi @c man end -@ifinfo -@format -START-INFO-DIR-ENTRY -* Binutils: (binutils). The GNU binary utilities. -* ar: (binutils)ar. Create, modify, and extract from archives -* nm: (binutils)nm. List symbols from object files -* objcopy: (binutils)objcopy. Copy and translate object files -* objdump: (binutils)objdump. Display information from object files -* ranlib: (binutils)ranlib. Generate index to archive contents -* readelf: (binutils)readelf. Display the contents of ELF format files. -* size: (binutils)size. List section sizes and total size -* strings: (binutils)strings. List printable strings from files -* strip: (binutils)strip. Discard symbols -* c++filt: (binutils)c++filt. Filter to demangle encoded C++ symbols -* cxxfilt: (binutils)c++filt. MS-DOS name for c++filt -* addr2line: (binutils)addr2line. Convert addresses to file and line -* nlmconv: (binutils)nlmconv. Converts object code into an NLM -* windres: (binutils)windres. Manipulate Windows resources -* windmc: (binutils)windmc. Generator for Windows message resources -* dlltool: (binutils)dlltool. Create files needed to build and use DLLs -END-INFO-DIR-ENTRY -@end format -@end ifinfo - @copying @c man begin COPYRIGHT Copyright @copyright{} 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.1 +under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the @@ -46,22 +23,32 @@ section entitled ``GNU Free Documentation License''. @c man end @end copying -@synindex ky cp -@c -@c This file documents the GNU binary utilities "ar", "ld", "objcopy", -@c "objdump", "nm", "size", "strings", "strip", "readelf" and "ranlib". -@c -@c Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -@c 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. -@c -@c This text may be freely distributed under the terms of the GNU -@c Free Documentation License. -@c - -@setchapternewpage odd -@settitle @sc{gnu} Binary Utilities +@dircategory Software development +@direntry +* Binutils: (binutils). The GNU binary utilities. +@end direntry + +@dircategory Individual utilities +@direntry +* addr2line: (binutils)addr2line. Convert addresses to file and line. +* ar: (binutils)ar. Create, modify, and extract from archives. +* c++filt: (binutils)c++filt. Filter to demangle encoded C++ symbols. +* cxxfilt: (binutils)c++filt. MS-DOS name for c++filt. +* dlltool: (binutils)dlltool. Create files needed to build and use DLLs. +* nlmconv: (binutils)nlmconv. Converts object code into an NLM. +* nm: (binutils)nm. List symbols from object files. +* objcopy: (binutils)objcopy. Copy and translate object files. +* objdump: (binutils)objdump. Display information from object files. +* ranlib: (binutils)ranlib. Generate index to archive contents. +* readelf: (binutils)readelf. Display the contents of ELF format files. +* size: (binutils)size. List section sizes and total size. +* strings: (binutils)strings. List printable strings from files. +* strip: (binutils)strip. Discard symbols. +* windmc: (binutils)windmc. Generator for Windows message resources. +* windres: (binutils)windres. Manipulate Windows resources. +@end direntry + @titlepage -@finalout @title The @sc{gnu} Binary Utilities @ifset VERSION_PACKAGE @subtitle @value{VERSION_PACKAGE} @@ -76,20 +63,11 @@ section entitled ``GNU Free Documentation License''. @tex {\parskip=0pt \hfill Cygnus Support\par \hfill -\TeX{}info \texinfoversion\par } +Texinfo \texinfoversion\par } @end tex @vskip 0pt plus 1filll -Copyright @copyright{} 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 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.1 - or any later version published by the Free Software Foundation; - with no Invariant Sections, with no Front-Cover Texts, and with no - Back-Cover Texts. A copy of the license is included in the - section entitled ``GNU Free Documentation License''. - +@insertcopying @end titlepage @contents @@ -155,8 +133,8 @@ Create the files needed to build and use Dynamic Link Libraries @end iftex This document is distributed under the terms of the GNU Free -Documentation License. A copy of the license is included in the -section entitled "GNU Free Documentation License". +Documentation License version 1.3. A copy of the license is included +in the section entitled ``GNU Free Documentation License''. @menu * ar:: Create, modify, and extract from archives @@ -164,7 +142,7 @@ 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. +* readelf:: Display the contents of ELF format files * size:: List section sizes and total size * strings:: List printable strings from files * strip:: Discard symbols @@ -176,10 +154,10 @@ section entitled "GNU Free Documentation License". * windmc:: Generator for Windows message resources * dlltool:: Create files needed to build and use DLLs * Common Options:: Command-line options for all utilities -* Selecting The Target System:: How these utilities determine the target. +* Selecting the Target System:: How these utilities determine the target * Reporting Bugs:: Reporting Bugs * GNU Free Documentation License:: GNU Free Documentation License -* Binutils Index:: Binutils Index +* Binutils Index:: Binutils Index @end menu @node ar @@ -192,7 +170,7 @@ section entitled "GNU Free Documentation License". @c man title ar create, modify, and extract from archives @smallexample -ar [-]@var{p}[@var{mod} [@var{relpos}] [@var{count}]] @var{archive} [@var{member}@dots{}] +ar [@option{--plugin} @var{name}] [-]@var{p}[@var{mod} [@var{relpos}] [@var{count}]] @var{archive} [@var{member}@dots{}] ar -M [ @end smallexample +@item --long-section-names @{enable,disable,keep@} +Controls the handling of long section names when processing @code{COFF} +and @code{PE-COFF} object formats. The default behaviour, @samp{keep}, +is to preserve long section names if any are present in the input file. +The @samp{enable} and @samp{disable} options forcibly enable or disable +the use of long section names in the output object; when @samp{disable} +is in effect, any long section names in the input object will be truncated. +The @samp{enable} option will only emit long section names if any are +present in the inputs; this is mostly the same as @samp{keep}, but it +is left undefined whether the @samp{enable} option might force the +creation of an empty string table in the output file. + @item --change-leading-char Some object file formats use special characters at the start of symbols. The most common such character is underscore, which compilers @@ -1501,7 +1564,7 @@ stripped executable. to add a link to the debugging info into the stripped executable. @end enumerate -Note - the choice of @code{.dbg} as an extension for the debug info +Note---the choice of @code{.dbg} as an extension for the debug info file is arbitrary. Also the @code{--only-keep-debug} step is optional. You could instead do this: @@ -1516,19 +1579,61 @@ i.e., the file pointed to by the @option{--add-gnu-debuglink} can be the full executable. It does not have to be a file created by the @option{--only-keep-debug} switch. -Note - this switch is only intended for use on fully linked files. It +Note---this switch is only intended for use on fully linked files. It does not make sense to use it on object files where the debugging information may be incomplete. Besides the gnu_debuglink feature currently only supports the presence of one filename containing debugging information, not multiple filenames on a one-per-object-file basis. +@item --file-alignment @var{num} +Specify the file alignment. Sections in the file will always begin at +file offsets which are multiples of this number. This defaults to +512. +[This option is specific to PE targets.] + +@item --heap @var{reserve} +@itemx --heap @var{reserve},@var{commit} +Specify the number of bytes of memory to reserve (and optionally commit) +to be used as heap for this program. +[This option is specific to PE targets.] + +@item --image-base @var{value} +Use @var{value} as the base address of your program or dll. This is +the lowest memory location that will be used when your program or dll +is loaded. To reduce the need to relocate and improve performance of +your dlls, each should have a unique base address and not overlap any +other dlls. The default is 0x400000 for executables, and 0x10000000 +for dlls. +[This option is specific to PE targets.] + +@item --section-alignment @var{num} +Sets the section alignment. Sections in memory will always begin at +addresses which are a multiple of this number. Defaults to 0x1000. +[This option is specific to PE targets.] + +@item --stack @var{reserve} +@itemx --stack @var{reserve},@var{commit} +Specify the number of bytes of memory to reserve (and optionally commit) +to be used as stack for this program. +[This option is specific to PE targets.] + +@item --subsystem @var{which} +@itemx --subsystem @var{which}:@var{major} +@itemx --subsystem @var{which}:@var{major}.@var{minor} +Specifies the subsystem under which your program will execute. The +legal values for @var{which} are @code{native}, @code{windows}, +@code{console}, @code{posix}, @code{efi-app}, @code{efi-bsd}, +@code{efi-rtd}, @code{sal-rtd}, and @code{xbox}. You may optionally set +the subsystem version also. Numeric values are also accepted for +@var{which}. +[This option is specific to PE targets.] + @item --extract-symbol Keep the file's section flags and symbols but remove all section data. Specifically, the option: @itemize -@item sets the virtual and load addresses of every section to zero; @item removes the contents of all sections; @item sets the size of every section to zero; and @item sets the file's start address to zero. @@ -1580,6 +1685,7 @@ objdump [@option{-a}|@option{--archive-headers}] [@option{-z}|@option{--disassemble-zeroes}] [@option{-EB}|@option{-EL}|@option{--endian=}@{big | little @}] [@option{-f}|@option{--file-headers}] + [@option{-F}|@option{--file-offsets}] [@option{--file-start-context}] [@option{-g}|@option{--debugging}] [@option{-e}|@option{--debugging-tags}] @@ -1594,7 +1700,8 @@ objdump [@option{-a}|@option{--archive-headers}] [@option{-r}|@option{--reloc}] [@option{-R}|@option{--dynamic-reloc}] [@option{-s}|@option{--full-contents}] - [@option{-W}|@option{--dwarf}] + [@option{-W[lLiaprmfFsoR]}| + @option{--dwarf}[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]] [@option{-G}|@option{--stabs}] [@option{-t}|@option{--syms}] [@option{-T}|@option{--dynamic-syms}] @@ -1606,6 +1713,9 @@ objdump [@option{-a}|@option{--archive-headers}] [@option{--[no-]show-raw-insn}] [@option{--adjust-vma=}@var{offset}] [@option{--special-syms}] + [@option{--prefix=}@var{prefix}] + [@option{--prefix-strip=}@var{level}] + [@option{--insn-width=}@var{width}] [@option{-V}|@option{--version}] [@option{-H}|@option{--help}] @var{objfile}@dots{} @@ -1680,11 +1790,11 @@ for more information on demangling. @item -g @itemx --debugging -Display debugging information. This attempts to parse debugging -information stored in the file and print it out using a C like syntax. -Only certain types of debugging information have been implemented. -Some other types are supported by @command{readelf -w}. -@xref{readelf}. +Display debugging information. This attempts to parse STABS and IEEE +debugging format information stored in the file and print it out using +a C like syntax. If neither of these formats are found this option +falls back on the @option{-W} option to print any DWARF information in +the file. @item -e @itemx --debugging-tags @@ -1704,6 +1814,10 @@ expected to contain instructions. Like @option{-d}, but disassemble the contents of all sections, not just those expected to contain instructions. +If the target is an ARM architecture this switch also has the effect +of forcing the disassembler to decode pieces of data found in code +sections as if they were instructions. + @item --prefix-addresses When disassembling, print the complete address on each line. This is the older disassembly format. @@ -1723,6 +1837,16 @@ does not describe endianness information, such as S-records. Display summary information from the overall header of each of the @var{objfile} files. +@item -F +@itemx --file-offsets +@cindex object file offsets +When disassembling sections, whenever a symbol is displayed, also +display the file offset of the region of data that is about to be +dumped. If zeroes are being skipped, then when disassembly resumes, +tell the user how many zeroes were skipped and the file offset of the +location from where the disassembly resumes. When dumping sections, +display the file offset of the location from where the dump starts. + @item --file-start-context @cindex source code context Specify that when displaying interlisted source code/disassembly @@ -1777,6 +1901,13 @@ can be useful when disassembling object files which do not describe architecture information, such as S-records. You can list the available architectures with the @option{-i} option. +If the target is an ARM architecture then this switch has an +additional effect. It restricts the disassembly to only those +instructions supported by the architecture specified by @var{machine}. +If it is necessary to use this switch because the input file does not +contain any architecture information, but it is also desired to +disassemble all the instructions use @option{-marm}. + @item -M @var{options} @itemx --disassembler-options=@var{options} Pass target specific information to the disassembler. Only supported on @@ -1809,7 +1940,11 @@ switch, but allow finer grained control. Multiple selections from the following may be specified as a comma separated string. @option{x86-64}, @option{i386} and @option{i8086} select disassembly for the given architecture. @option{intel} and @option{att} select between -intel syntax mode and AT&T syntax mode. @option{addr64}, @option{addr32}, +intel syntax mode and AT&T syntax mode. +@option{intel-mnemonic} and @option{att-mnemonic} select between +intel mnemonic mode and AT&T mnemonic mode. @option{intel-mnemonic} +implies @option{intel} and @option{att-mnemonic} implies @option{att}. +@option{addr64}, @option{addr32}, @option{addr16}, @option{data32} and @option{data16} specify the default address size and operand size. These four options will be overridden if @option{x86-64}, @option{i386} or @option{i8086} appear later in the @@ -1817,11 +1952,12 @@ option string. Lastly, @option{suffix}, when in AT&T mode, instructs the disassembler to print a mnemonic suffix even when the suffix could be inferred by the operands. -For PPC, @option{booke}, @option{booke32} and @option{booke64} select -disassembly of BookE instructions. @option{32} and @option{64} select -PowerPC and PowerPC64 disassembly, respectively. @option{e300} selects +For PowerPC, @option{booke} controls the disassembly of BookE +instructions. @option{32} and @option{64} select PowerPC and +PowerPC64 disassembly, respectively. @option{e300} selects disassembly for the e300 family. @option{440} selects disassembly for -the PowerPC 440. +the PowerPC 440. @option{ppcps} selects disassembly for the paired +single instructions of the PPC750CL. For MIPS, this option controls the printing of instruction mnemonic names and register names in disassembled instructions. Multiple @@ -1895,7 +2031,9 @@ disassembly. @cindex dynamic relocation entries, in object file Print the dynamic relocation entries of the file. This is only meaningful for dynamic objects, such as certain types of shared -libraries. +libraries. As for @option{-r}, if used with @option{-d} or +@option{-D}, the relocations are printed interspersed with the +disassembly. @item -s @itemx --full-contents @@ -1911,6 +2049,16 @@ non-empty sections are displayed. Display source code intermixed with disassembly, if possible. Implies @option{-d}. +@item --prefix=@var{prefix} +@cindex Add prefix to absolute paths +Specify @var{prefix} to add to the absolute paths when used with +@option{-S}. + +@item --prefix-strip=@var{level} +@cindex Strip absolute paths +Indicate how many initial directory names to strip off the hardwired +absolute paths. It has no effect without @option{--prefix=}@var{prefix}. + @item --show-raw-insn When disassembling instructions, print the instruction in hex as well as in symbolic form. This is the default except when @@ -1920,12 +2068,18 @@ in symbolic form. This is the default except when When disassembling instructions, do not print the instruction bytes. This is the default when @option{--prefix-addresses} is used. -@item -W -@itemx --dwarf +@item --insn-width=@var{width} +@cindex Instruction width +Display @var{width} bytes on a single line when disassembling +instructions. + +@item -W[lLiaprmfFsoR] +@itemx --dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges] @cindex DWARF @cindex debug symbols -Displays the contents of the DWARF debug sections in the file, if any -are present. +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. @item -G @itemx --stabs @@ -1959,7 +2113,86 @@ of the @option{-d}, @option{-r} and @option{-s} options. @itemx --syms @cindex symbol table entries, printing Print the symbol table entries of the file. -This is similar to the information provided by the @samp{nm} program. +This is similar to the information provided by the @samp{nm} program, +although the display format is different. The format of the output +depends upon the format of the file being dumped, but there are two main +types. One looks like this: + +@smallexample +[ 4](sec 3)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .bss +[ 6](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 fred +@end smallexample + +where the number inside the square brackets is the number of the entry +in the symbol table, the @var{sec} number is the section number, the +@var{fl} value are the symbol's flag bits, the @var{ty} number is the +symbol's type, the @var{scl} number is the symbol's storage class and +the @var{nx} value is the number of auxilary entries associated with +the symbol. The last two fields are the symbol's value and its name. + +The other common output format, usually seen with ELF based files, +looks like this: + +@smallexample +00000000 l d .bss 00000000 .bss +00000000 g .text 00000000 fred +@end smallexample + +Here the first number is the symbol's value (sometimes refered to as +its address). The next field is actually a set of characters and +spaces indicating the flag bits that are set on the symbol. These +characters are described below. Next is the section with which the +symbol is associated or @emph{*ABS*} if the section is absolute (ie +not connected with any section), or @emph{*UND*} if the section is +referenced in the file being dumped, but not defined there. + +After the section name comes another field, a number, which for common +symbols is the alignment and for other symbol is the size. Finally +the symbol's name is displayed. + +The flag characters are divided into 7 groups as follows: +@table @code +@item l +@itemx g +@itemx u +@itemx ! +The symbol is a local (l), global (g), unique global (u), neither +global nor local (a space) or both global and local (!). A +symbol can be neither local or global for a variety of reasons, e.g., +because it is used for debugging, but it is probably an indication of +a bug if it is ever both local and global. Unique global symbols are +a GNU extension to the standard set of ELF symbol bindings. For such +a symbol the dynamic linker will make sure that in the entire process +there is just one symbol with this name and type in use. + +@item w +The symbol is weak (w) or strong (a space). + +@item C +The symbol denotes a constructor (C) or an ordinary symbol (a space). + +@item W +The symbol is a warning (W) or a normal symbol (a space). A warning +symbol's name is a message to be displayed if the symbol following the +warning symbol is ever referenced. + +@item I +@item i +The symbol is an indirect reference to another symbol (I), a function +to be evaluated during reloc processing (i) or a normal symbol (a +space). + +@item d +@itemx D +The symbol is a debugging symbol (d) or a dynamic symbol (D) or a +normal symbol (a space). + +@item F +@item f +@item O +The symbol is the name of a function (F) or a file (f) or an object +(O) or just a normal symbol (a space). +@end table @item -T @itemx --dynamic-syms @@ -2018,7 +2251,7 @@ nm(1), readelf(1), and the Info entries for @file{binutils}. @smallexample @c man begin SYNOPSIS ranlib -ranlib [@option{-vV}] @var{archive} +ranlib [@option{-vVt}] @var{archive} @c man end @end smallexample @@ -2047,6 +2280,9 @@ The @sc{gnu} @command{ranlib} program is another form of @sc{gnu} @command{ar}; @itemx -V @itemx --version Show the version number of @command{ranlib}. + +@item -t +Update the timestamp of the symbol map of an archive. @end table @c man end @@ -2193,7 +2429,7 @@ ar(1), objdump(1), readelf(1), and the Info entries for @file{binutils}. @smallexample @c man begin SYNOPSIS strings -strings [@option{-afov}] [@option{-}@var{min-len}] +strings [@option{-afovV}] [@option{-}@var{min-len}] [@option{-n} @var{min-len}] [@option{--bytes=}@var{min-len}] [@option{-t} @var{radix}] [@option{--radix=}@var{radix}] [@option{-e} @var{encoding}] [@option{--encoding=}@var{encoding}] @@ -2257,7 +2493,8 @@ Possible values for @var{encoding} are: @samp{s} = single-7-bit-byte characters (ASCII, ISO 8859, etc., default), @samp{S} = single-8-bit-byte characters, @samp{b} = 16-bit bigendian, @samp{l} = 16-bit littleendian, @samp{B} = 32-bit bigendian, @samp{L} = 32-bit -littleendian. Useful for finding wide character strings. +littleendian. Useful for finding wide character strings. (@samp{l} +and @samp{b} apply to, for example, Unicode UTF-16/UCS-2 encodings). @item -T @var{bfdname} @itemx --target=@var{bfdname} @@ -2266,6 +2503,7 @@ Specify an object code format other than your system's default format. @xref{Target Selection}, for more information. @item -v +@itemx -V @itemx --version Print the program version number on the standard output and exit. @end table @@ -2439,22 +2677,22 @@ stripped executable. to add a link to the debugging info into the stripped executable. @end enumerate -Note - the choice of @code{.dbg} as an extension for the debug info +Note---the choice of @code{.dbg} as an extension for the debug info file is arbitrary. Also the @code{--only-keep-debug} step is optional. You could instead do this: @enumerate @item Link the executable as normal. -@item Copy @code{foo} to @code{foo.full} +@item Copy @code{foo} to @code{foo.full} @item Run @code{strip --strip-debug foo} @item Run @code{objcopy --add-gnu-debuglink=foo.full foo} @end enumerate -ie the file pointed to by the @option{--add-gnu-debuglink} can be the +i.e., the file pointed to by the @option{--add-gnu-debuglink} can be the full executable. It does not have to be a file created by the @option{--only-keep-debug} switch. -Note - this switch is only intended for use on fully linked files. It +Note---this switch is only intended for use on fully linked files. It does not make sense to use it on object files where the debugging information may be incomplete. Besides the gnu_debuglink feature currently only supports the presence of one filename containing @@ -2554,11 +2792,11 @@ name which makes it invalid). This command however will work: echo _Z1fv, | c++filt -n @end smallexample -and will display ``f(),'' ie the demangled name followed by a +and will display ``f(),'', i.e., the demangled name followed by a trailing comma. This behaviour is because when the names are read from the standard input it is expected that they might be part of an assembler source file where there might be extra, extraneous -characters trailing after a mangled name. eg: +characters trailing after a mangled name. For example: @smallexample .type _Z1fv, @@function @@ -2576,11 +2814,6 @@ of every name. For example, the C name @code{foo} gets the low-level name @code{_foo}. This option removes the initial underscore. Whether @command{c++filt} removes the underscore by default is target dependent. -@item -j -@itemx --java -Prints demangled names using Java syntax. The default is to use C++ -syntax. - @item -n @itemx --no-strip-underscores Do not remove the initial underscore. @@ -2594,7 +2827,7 @@ the function's parameters. @itemx --types Attempt to demangle types as well as function names. This is disabled by default since mangled types are normally only used internally in -the compiler, and they can be confused with non-mangled names. eg +the compiler, and they can be confused with non-mangled names. For example, a function called ``a'' treated as a mangled type name would be demangled to ``signed char''. @@ -3021,12 +3254,11 @@ format. This is the default behaviour. @item -v @item --verbose -Enable verbose mode. This tells you what the preprocessor is if you -didn't specify one. +Enable verbose mode. @item -V @item --version -Prints the version number for @command{windres}. +Prints the version number for @command{windmc}. @item -x @var{path} @itemx --xdgb @var{path} @@ -3260,6 +3492,7 @@ dlltool [@option{-d}|@option{--input-def} @var{def-file-name}] [@option{-e}|@option{--output-exp} @var{exports-file-name}] [@option{-z}|@option{--output-def} @var{def-file-name}] [@option{-l}|@option{--output-lib} @var{library-file-name}] + [@option{-y}|@option{--output-delaylib} @var{library-file-name}] [@option{--export-all-symbols}] [@option{--no-export-all-symbols}] [@option{--exclude-symbols} @var{list}] [@option{--no-default-excludes}] @@ -3269,7 +3502,10 @@ dlltool [@option{-d}|@option{--input-def} @var{def-file-name}] [@option{-U}|@option{--add-underscore}] [@option{--add-stdcall-underscore}] [@option{-k}|@option{--kill-at}] [@option{-A}|@option{--add-stdcall-alias}] [@option{-p}|@option{--ext-prefix-alias} @var{prefix}] - [@option{-x}|@option{--no-idata4}] [@option{-c}|@option{--no-idata5}] [@option{-i}|@option{--interwork}] + [@option{-x}|@option{--no-idata4}] [@option{-c}|@option{--no-idata5}] + [@option{--use-nul-prefixed-import-tables}] + [@option{-I}|@option{--identify} @var{library-file-name}] [@option{--identify-strict}] + [@option{-i}|@option{--interwork}] [@option{-n}|@option{--nodelete}] [@option{-t}|@option{--temp-prefix} @var{prefix}] [@option{-v}|@option{--verbose}] [@option{-h}|@option{--help}] [@option{-V}|@option{--version}] @@ -3319,9 +3555,16 @@ binary file and it can be created by giving the @option{-e} option to @command{dlltool} when it is creating or reading in a @file{.def} file. The third file needed for DLL creation is the library file that programs -will link with in order to access the functions in the DLL. This file -can be created by giving the @option{-l} option to dlltool when it -is creating or reading in a @file{.def} file. +will link with in order to access the functions in the DLL (an `import +library'). This file can be created by giving the @option{-l} option to +dlltool when it is creating or reading in a @file{.def} file. + +If the @option{-y} option is specified, dlltool generates a delay-import +library that can be used instead of the normal import library to allow +a program to link to the dll only as soon as an imported function is +called for the first time. The resulting executable will need to be +linked to the static delayimp library containing __delayLoadHelper2(), +which in turn will import LoadLibraryA and GetProcAddress from kernel32. @command{dlltool} builds the library file by hand, but it builds the exports file by creating temporary files containing assembler statements @@ -3344,6 +3587,11 @@ that uses that DLL: gcc program.o dll.lib -o program @end smallexample + +@command{dlltool} may also be used to query an existing import library +to determine the name of the DLL to which it is associated. See the +description of the @option{-I} or @option{--identify} option. + @c man end @c man begin OPTIONS dlltool @@ -3376,6 +3624,10 @@ Specifies the name of the @file{.def} file to be created by dlltool. @itemx --output-lib @var{filename} Specifies the name of the library file to be created by dlltool. +@item -y @var{filename} +@itemx --output-delaylib @var{filename} +Specifies the name of the delay-import library file to be created by dlltool. + @item --export-all-symbols Treat all global and weak defined symbols found in the input object files as symbols to be exported. There is a small list of symbols which @@ -3477,12 +3729,32 @@ Specifies that when @command{dlltool} is creating the exports and library files it should omit the @code{.idata4} section. This is for compatibility with certain operating systems. +@item --use-nul-prefixed-import-tables +Specifies that when @command{dlltool} is creating the exports and library +files it should prefix the @code{.idata4} and @code{.idata5} by zero an +element. This emulates old gnu import library generation of +@code{dlltool}. By default this option is turned off. + @item -c @itemx --no-idata5 Specifies that when @command{dlltool} is creating the exports and library files it should omit the @code{.idata5} section. This is for compatibility with certain operating systems. +@item -I @var{filename} +@itemx --identify @var{filename} +Specifies that @command{dlltool} should inspect the import library +indicated by @var{filename} and report, on @code{stdout}, the name(s) +of the associated DLL(s). This can be performed in addition to any +other operations indicated by the other options and arguments. +@command{dlltool} fails if the import library does not exist or is not +actually an import library. See also @option{--identify-strict}. + +@item --identify-strict +Modifies the behavior of the @option{--identify} option, such +that an error is reported if @var{filename} is associated with +more than one DLL. + @item -i @itemx --interwork Specifies that @command{dlltool} should mark the objects in the library @@ -3601,8 +3873,11 @@ readelf [@option{-a}|@option{--all}] [@option{-A}|@option{--arch-specific}] [@option{-D}|@option{--use-dynamic}] [@option{-x} |@option{--hex-dump=}] - [@option{-w[liaprmfFsoR]}| - @option{--debug-dump}[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]] + [@option{-p} |@option{--string-dump=}] + [@option{-R} |@option{--relocated-dump=}] + [@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{-v}|@option{--version}] [@option{-W}|@option{--wide}] @@ -3722,16 +3997,41 @@ symbols section. @item -x @itemx --hex-dump= -Displays the contents of the indicated section as a hexadecimal dump. +Displays the contents of the indicated section as a hexadecimal bytes. 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 -w[liaprmfFsoR] -@itemx --debug-dump[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges] +@item -R +@itemx --relocated-dump= +Displays the contents of the indicated section as a hexadecimal +bytes. 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. The contents of the section will be relocated +before they are displayed. + +@item -p +@itemx --string-dump= +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 -c +@itemx --archive-index +@cindex Archive file symbol index information +Displays the file symbol index infomation 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] 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: 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. + @item -I @itemx --histogram Display a histogram of bucket list lengths when displaying the contents @@ -3784,7 +4084,7 @@ Display the version number of the program. @end table @c man end -@node Selecting The Target System +@node Selecting the Target System @chapter Selecting the Target System You can specify two aspects of the target system to the @sc{gnu} @@ -4140,6 +4440,9 @@ Such guesses are usually wrong. Even we cannot guess right about such things without first using the debugger to find the facts. @end itemize +@node GNU Free Documentation License +@appendix GNU Free Documentation License + @include fdl.texi @node Binutils Index