Add -M command line switch to objdump - text of switch is passed on to disassembler
[deliverable/binutils-gdb.git] / binutils / binutils.texi
index 5892fa8e6b70a7ba6515dfdf2f00b975f4b02670..535df3f6b8a0f0a16ec7119dd44e407e91e13631 100644 (file)
@@ -6,14 +6,14 @@
 @format
 START-INFO-DIR-ENTRY
 * Binutils: (binutils).         The GNU binary utilities "ar", "objcopy",
 @format
 START-INFO-DIR-ENTRY
 * Binutils: (binutils).         The GNU binary utilities "ar", "objcopy",
-                               "objdump", "nm", "nlmconv", "size", 
-                                "strings", "strip", and "ranlib".
+                               "objdump", "nm", "nlmconv", "size", "readelf"
+                                "strings", "strip", "ranlib" and "dlltool".
 END-INFO-DIR-ENTRY
 @end format
 @end ifinfo
 
 @ifinfo
 END-INFO-DIR-ENTRY
 @end format
 @end ifinfo
 
 @ifinfo
-Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
 
 Permission is granted to make and distribute verbatim copies of
 this manual provided the copyright notice and this permission notice
 
 Permission is granted to make and distribute verbatim copies of
 this manual provided the copyright notice and this permission notice
@@ -39,9 +39,9 @@ into another language, under the above conditions for modified versions.
 @synindex ky cp
 @c
 @c This file documents the GNU binary utilities "ar", "ld", "objcopy",
 @synindex ky cp
 @c
 @c This file documents the GNU binary utilities "ar", "ld", "objcopy",
-@c  "objdump", "nm", "size", "strings", "strip", and "ranlib".
+@c  "objdump", "nm", "size", "strings", "strip", "readelf" and "ranlib".
 @c
 @c
-@c Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+@c Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc.
 @c 
 @c This text may be freely distributed under the terms of the GNU
 @c General Public License.
 @c 
 @c This text may be freely distributed under the terms of the GNU
 @c General Public License.
@@ -66,7 +66,7 @@ into another language, under the above conditions for modified versions.
 @end tex
 
 @vskip 0pt plus 1filll
 @end tex
 
 @vskip 0pt plus 1filll
-Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
 
 Permission is granted to make and distribute verbatim copies of
 this manual provided the copyright notice and this permission notice
 
 Permission is granted to make and distribute verbatim copies of
 this manual provided the copyright notice and this permission notice
@@ -105,6 +105,9 @@ Display information from object files
 @item ranlib
 Generate index to archive contents
 
 @item ranlib
 Generate index to archive contents
 
+@item readelf
+Display the contents of ELF format files.
+
 @item size
 List file section sizes and total size
 
 @item size
 List file section sizes and total size
 
@@ -125,6 +128,9 @@ Convert object code into a Netware Loadable Module
 
 @item windres
 Manipulate Windows resources
 
 @item windres
 Manipulate Windows resources
+
+@item dlltool
+Create the files needed to build and use Dynamic Link Libraries
 @end table
 @end iftex
 
 @end table
 @end iftex
 
@@ -134,6 +140,7 @@ Manipulate Windows resources
 * objcopy::                    Copy and translate object files
 * objdump::                     Display information from object files
 * ranlib::                      Generate index to archive contents
 * 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
 * size::                        List section sizes and total size
 * strings::                     List printable strings from files
 * strip::                       Discard symbols
@@ -141,6 +148,7 @@ Manipulate Windows resources
 * addr2line::                  Convert addresses to file and line
 * nlmconv::                     Converts object code into an NLM
 * windres::                    Manipulate Windows resources
 * addr2line::                  Convert addresses to file and line
 * nlmconv::                     Converts object code into an NLM
 * windres::                    Manipulate Windows resources
+* dlltool::                    Create files needed to build and use DLLs
 * Selecting The Target System:: How these utilities determine the target.
 * Reporting Bugs::              Reporting Bugs
 * Index::                       Index
 * Selecting The Target System:: How these utilities determine the target.
 * Reporting Bugs::              Reporting Bugs
 * Index::                       Index
@@ -279,8 +287,8 @@ Since the point of this operation is speed, the archive's symbol table
 index is not updated, even if it already existed; you can use @samp{ar s} or
 @code{ranlib} explicitly to update the symbol table index.
 
 index is not updated, even if it already existed; you can use @samp{ar s} or
 @code{ranlib} explicitly to update the symbol table index.
 
-However, too many different system assume quick append rebuilds the
-index, so GNU ar treats @code{q} to same way its treats @code{r}.
+However, too many different systems assume quick append rebuilds the
+index, so GNU ar implements @code{q} as a synonym for @code{r}.
 
 @item r
 @cindex replacement in archive
 
 @item r
 @cindex replacement in archive
@@ -388,6 +396,14 @@ even if no other change is made to the archive.  You may use this modifier
 flag either with any operation, or alone.  Running @samp{ar s} on an
 archive is equivalent to running @samp{ranlib} on it.
 
 flag either with any operation, or alone.  Running @samp{ar s} on an
 archive is equivalent to running @samp{ranlib} on it.
 
+@item S
+@cindex not writing archive index
+Do not generate an archive symbol table.  This can speed up building a
+large library in several steps.  The resulting archive can not be used
+with the linker.  In order to build a symbol table, you must omit the
+@samp{S} modifier on the last execution of @samp{ar}, or you must run
+@samp{ranlib} on the archive.
+
 @item u
 @cindex updating an archive
 Normally, @samp{ar r}@dots{} inserts all files
 @item u
 @cindex updating an archive
 Normally, @samp{ar r}@dots{} inserts all files
@@ -486,7 +502,7 @@ Add each named @var{member} as a module in the current archive.
 Requires prior use of @code{OPEN} or @code{CREATE}.
 
 @item CLEAR
 Requires prior use of @code{OPEN} or @code{CREATE}.
 
 @item CLEAR
-Discard the contents of the current archive, cancelling the effect of
+Discard the contents of the current archive, canceling the effect of
 any operations since the last @code{SAVE}.  May be executed (with no
 effect) even if  no current archive is specified.
 
 any operations since the last @code{SAVE}.  May be executed (with no
 effect) even if  no current archive is specified.
 
@@ -538,7 +554,7 @@ Requires prior use of @code{OPEN} or @code{CREATE}.
 @item LIST
 Display full contents of the current archive, in ``verbose'' style
 regardless of the state of @code{VERBOSE}.  The effect is like @samp{ar
 @item LIST
 Display full contents of the current archive, in ``verbose'' style
 regardless of the state of @code{VERBOSE}.  The effect is like @samp{ar
-tv @var{archive}}).  (This single command is a @sc{gnu} @code{ld}
+tv @var{archive}}.  (This single command is a @sc{gnu} @code{ar}
 enhancement, rather than present for MRI compatibility.)
 
 Requires prior use of @code{OPEN} or @code{CREATE}.
 enhancement, rather than present for MRI compatibility.)
 
 Requires prior use of @code{OPEN} or @code{CREATE}.
@@ -816,18 +832,21 @@ objcopy [ -F @var{bfdname} | --target=@var{bfdname} ]
         [ -S | --strip-all ]  [ -g | --strip-debug ]
         [ -K @var{symbolname} | --keep-symbol=@var{symbolname} ]
         [ -N @var{symbolname} | --strip-symbol=@var{symbolname} ]
         [ -S | --strip-all ]  [ -g | --strip-debug ]
         [ -K @var{symbolname} | --keep-symbol=@var{symbolname} ]
         [ -N @var{symbolname} | --strip-symbol=@var{symbolname} ]
-        [ -P @var{symbolname} | --privatize-symbol=@var{symbolname} ]
+        [ -L @var{symbolname} | --localize-symbol=@var{symbolname} ]
         [ -W @var{symbolname} | --weaken-symbol=@var{symbolname} ]
         [ -x | --discard-all ]  [ -X | --discard-locals ]
         [ -b @var{byte} | --byte=@var{byte} ]
         [ -i @var{interleave} | --interleave=@var{interleave} ]
         [ -W @var{symbolname} | --weaken-symbol=@var{symbolname} ]
         [ -x | --discard-all ]  [ -X | --discard-locals ]
         [ -b @var{byte} | --byte=@var{byte} ]
         [ -i @var{interleave} | --interleave=@var{interleave} ]
+        [ -j @var{sectionname} | --only-section=@var{sectionname} ]
         [ -R @var{sectionname} | --remove-section=@var{sectionname} ]
         [ -p | --preserve-dates ] [ --debugging ]
         [ --gap-fill=@var{val} ] [ --pad-to=@var{address} ]
         [ --set-start=@var{val} ] [ --adjust-start=@var{incr} ]
         [ -R @var{sectionname} | --remove-section=@var{sectionname} ]
         [ -p | --preserve-dates ] [ --debugging ]
         [ --gap-fill=@var{val} ] [ --pad-to=@var{address} ]
         [ --set-start=@var{val} ] [ --adjust-start=@var{incr} ]
-        [ --adjust-vma=@var{incr} ]
-        [ --adjust-section-vma=@var{section}@{=,+,-@}@var{val} ]
-        [ --adjust-warnings ] [ --no-adjust-warnings ]
+        [ --change-addresses=@var{incr} ]
+        [ --change-section-address=@var{section}@{=,+,-@}@var{val} ]
+        [ --change-section-lma=@var{section}@{=,+,-@}@var{val} ]
+        [ --change-section-vma=@var{section}@{=,+,-@}@var{val} ]
+        [ --change-warnings ] [ --no-change-warnings ]
         [ --set-section-flags=@var{section}=@var{flags} ]
         [ --add-section=@var{sectionname}=@var{filename} ]
         [ --change-leading-char ] [ --remove-leading-char ]
         [ --set-section-flags=@var{section}=@var{flags} ]
         [ --add-section=@var{sectionname}=@var{filename} ]
         [ --change-leading-char ] [ --remove-leading-char ]
@@ -887,6 +906,12 @@ Use @var{bfdname} as the object format for both the input and the output
 file; i.e., simply transfer data from source to destination with no
 translation.  @xref{Target Selection}, for more information.
 
 file; i.e., simply transfer data from source to destination with no
 translation.  @xref{Target Selection}, for more information.
 
+@item -j @var{sectionname}
+@itemx --only-section=@var{sectionname}
+Copy only the named section from the input file to the output file.
+This option may be given more than once.  Note that using this option
+inappropriately may make the output file unusable.
+
 @item -R @var{sectionname}
 @itemx --remove-section=@var{sectionname}
 Remove any section named @var{sectionname} from the output file.  This
 @item -R @var{sectionname}
 @itemx --remove-section=@var{sectionname}
 Remove any section named @var{sectionname} from the output file.  This
@@ -914,8 +939,8 @@ be given more than once.
 Do not copy symbol @var{symbolname} from the source file.  This option
 may be given more than once.
 
 Do not copy symbol @var{symbolname} from the source file.  This option
 may be given more than once.
 
-@item -P @var{symbolname}
-@itemx --privatize-symbol=@var{symbolname}
+@item -L @var{symbolname}
+@itemx --localize-symbol=@var{symbolname}
 Make symbol @var{symbolname} local to the file, so that it is not
 visible externally.  This option may be given more than once.
 
 Make symbol @var{symbolname} local to the file, so that it is not
 visible externally.  This option may be given more than once.
 
@@ -960,12 +985,13 @@ because only certain debugging formats are supported, and the
 conversion process can be time consuming.
 
 @item --gap-fill @var{val}
 conversion process can be time consuming.
 
 @item --gap-fill @var{val}
-Fill gaps between sections with @var{val}.  This is done by increasing
+Fill gaps between sections with @var{val}.  This operation applies to
+the @emph{load address} (LMA) of the sections.  It is done by increasing
 the size of the section with the lower address, and filling in the extra
 space created with @var{val}.
 
 @item --pad-to @var{address}
 the size of the section with the lower address, and filling in the extra
 space created with @var{val}.
 
 @item --pad-to @var{address}
-Pad the output file up to the virtual address @var{address}.  This is
+Pad the output file up to the load address @var{address}.  This is
 done by increasing the size of the last section.  The extra space is
 filled in with the value specified by @samp{--gap-fill} (default zero).
 
 done by increasing the size of the last section.  The extra space is
 filled in with the value specified by @samp{--gap-fill} (default zero).
 
@@ -973,40 +999,80 @@ filled in with the value specified by @samp{--gap-fill} (default zero).
 Set the address of the new file to @var{val}.  Not all object file
 formats support setting the start address.
 
 Set the address of the new file to @var{val}.  Not all object file
 formats support setting the start address.
 
-@item --adjust-start @var{incr}
-Adjust the start address by adding @var{incr}.  Not all object file
+@item --change-start @var{incr}
+@itemx --adjust-start @var{incr}
+@cindex changing start address
+Change the start address by adding @var{incr}.  Not all object file
 formats support setting the start address.
 
 formats support setting the start address.
 
-@item --adjust-vma @var{incr}
-Adjust the address of all sections, as well as the start address, by
-adding @var{incr}.  Some object file formats do not permit section
-addresses to be changed arbitrarily.  Note that this does not relocate
-the sections; if the program expects sections to be loaded at a certain
-address, and this option is used to change the sections such that they
-are loaded at a different address, the program may fail.
-
-@item --adjust-section-vma @var{section}@{=,+,-@}@var{val}
-Set or adjust the address of the named @var{section}.  If @samp{=} is
-used, the section address is set to @var{val}.  Otherwise, @var{val} is
-added to or subtracted from the section address.  See the comments under
-@samp{--adjust-vma}, above.  If @var{section} does not exist in the
-input file, a warning will be issued, unless @samp{--no-adjust-warnings}
-is used.
-
-@item --adjust-warnings
-If @samp{--adjust-section-vma} is used, and the named section does not
-exist, issue a warning.  This is the default.
-
-@item --no-adjust-warnings
-Do not issue a warning if @samp{--adjust-section-vma} is used, even if
-the named section does not exist.
+@item --change-addresses @var{incr}
+@itemx --adjust-vma @var{incr}
+@cindex changing object addresses
+Change the VMA and LMA addresses of all sections, as well as the start
+address, by adding @var{incr}.  Some object file formats do not permit
+section addresses to be changed arbitrarily.  Note that this does not
+relocate the sections; if the program expects sections to be loaded at a
+certain address, and this option is used to change the sections such
+that they are loaded at a different address, the program may fail. 
+
+@item --change-section-address @var{section}@{=,+,-@}@var{val}
+@itemx --adjust-section-vma @var{section}@{=,+,-@}@var{val}
+@cindex changing section address
+Set or change both the VMA address and the LMA address of the named
+@var{section}.  If @samp{=} is used, the section address is set to
+@var{val}.  Otherwise, @var{val} is added to or subtracted from the
+section address.  See the comments under @samp{--change-addresses},
+above. If @var{section} does not exist in the input file, a warning will
+be issued, unless @samp{--no-change-warnings} is used.
+
+@item --change-section-lma @var{section}@{=,+,-@}@var{val}
+@cindex changing section LMA
+Set or change the LMA address of the named @var{section}.  The LMA
+address is the address where the section will be loaded into memory at
+program load time.  Normally this is the same as the VMA address, which
+is the address of the section at program run time, but on some systems,
+especially those where a program is held in ROM, the two can be
+different.  If @samp{=} is used, the section address is set to
+@var{val}.  Otherwise, @var{val} is added to or subtracted from the
+section address.  See the comments under @samp{--change-addresses},
+above.  If @var{section} does not exist in the input file, a warning
+will be issued, unless @samp{--no-change-warnings} is used.  
+
+@item --change-section-vma @var{section}@{=,+,-@}@var{val}
+@cindex changing section VMA
+Set or change the VMA address of the named @var{section}.  The VMA
+address is the address where the section will be located once the
+program has started executing.  Normally this is the same as the LMA
+address, which is the address where the section will be loaded into
+memory, but on some systems, especially those where a program is held in
+ROM, the two can be different.  If @samp{=} is used, the section address
+is set to @var{val}.  Otherwise, @var{val} is added to or subtracted
+from the section address.  See the comments under
+@samp{--change-addresses}, above.  If @var{section} does not exist in
+the input file, a warning will be issued, unless
+@samp{--no-change-warnings} is used.   
+
+@item --change-warnings
+@itemx --adjust-warnings
+If @samp{--change-section-address} or @samp{--change-section-lma} or
+@samp{--change-section-vma} is used, and the named section does not
+exist, issue a warning.  This is the default. 
+
+@item --no-change-warnings
+@itemx --no-adjust-warnings
+Do not issue a warning if @samp{--change-section-address} or
+@samp{--adjust-section-lma} or @samp{--adjust-section-vma} is used, even
+if the named section does not exist. 
 
 @item --set-section-flags @var{section}=@var{flags}
 Set the flags for the named section.  The @var{flags} argument is a
 comma separated string of flag names.  The recognized names are
 
 @item --set-section-flags @var{section}=@var{flags}
 Set the flags for the named section.  The @var{flags} argument is a
 comma separated string of flag names.  The recognized names are
-@samp{alloc}, @samp{load}, @samp{readonly}, @samp{code}, @samp{data},
-and @samp{rom}.  Not all flags are meaningful for all object file
-formats.
+@samp{alloc}, @samp{contents}, @samp{load}, @samp{readonly},
+@samp{code}, @samp{data}, and @samp{rom}.  You can set the
+@samp{contents} flag for a section which does not have contents, but it
+is not meaningful to clear the @samp{contents} flag of a section which
+does have contents--just remove the section instead.  Not all flags are
+meaningful for all object file formats.
 
 @item --add-section @var{sectionname}=@var{filename}
 Add a new section named @var{sectionname} while copying the file.  The
 
 @item --add-section @var{sectionname}=@var{filename}
 Add a new section named @var{sectionname} while copying the file.  The
@@ -1071,6 +1137,8 @@ objdump [ -a | --archive-headers ]
         [ -j @var{section} | --section=@var{section} ]
         [ -l | --line-numbers ] [ -S | --source ]
         [ -m @var{machine} | --architecture=@var{machine} ]
         [ -j @var{section} | --section=@var{section} ]
         [ -l | --line-numbers ] [ -S | --source ]
         [ -m @var{machine} | --architecture=@var{machine} ]
+        [ -M @var{options} | --disassembler-options=@var{options}]
+        [ -p | --private-headers ]
         [ -r | --reloc ] [ -R | --dynamic-reloc ]
         [ -s | --full-contents ]  [ --stabs ]
         [ -t | --syms ] [ -T | --dynamic-syms ] [ -x | --all-headers ]
         [ -r | --reloc ] [ -R | --dynamic-reloc ]
         [ -s | --full-contents ]  [ --stabs ]
         [ -t | --syms ] [ -T | --dynamic-syms ] [ -x | --all-headers ]
@@ -1224,10 +1292,31 @@ Only useful with @samp{-d}, @samp{-D}, or @samp{-r}.
 @cindex architecture
 @cindex disassembly architecture
 Specify the architecture to use when disassembling object files.  This
 @cindex architecture
 @cindex disassembly architecture
 Specify the architecture to use when disassembling object files.  This
-can be useful when disasembling object files which do not describe
+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 @samp{-i} option.
 
 architecture information, such as S-records.  You can list the available
 architectures with the @samp{-i} option.
 
+@item -M @var{options}
+@itemx --disassembler-options=@var{options}
+Pass target specific information to the disassembler.  Only supported on
+some targets.
+
+If the target is an ARM architecture then this switch can be used to
+select which register name set is used during disassembler.  Specifying
+@samp{--disassembler-options=reg-name-std} (the default) will select the
+register names as used in ARM's instruction set documentation, but with
+register 13 called 'sp', register 14 called 'lr' and register 15 called
+'pc'.  Specifying @samp{--disassembler-options=reg-names-apcs} will
+select the name set used by the ARM Procedure Call Standard, whilst
+specifying @samp{--disassembler-options=reg-names-raw} will just use
+@samp{r} followed by the register number.
+
+@item -p
+@itemx --private-headers
+Print information that is specific to the object file format.  The exact
+information printed depends upon the object file format.  For some
+object file formats, no additional information is printed.
+
 @item -r
 @itemx --reloc
 @cindex relocation entries, in object file
 @item -r
 @itemx --reloc
 @cindex relocation entries, in object file
@@ -1314,7 +1403,7 @@ relocation entries.  Using @samp{-x} is equivalent to specifying all of
 @samp{-a -f -h -r -t}.
 
 @item -w
 @samp{-a -f -h -r -t}.
 
 @item -w
-@item --wide
+@itemx --wide
 @cindex wide output, printing
 Format some lines for output devices that have more than 80 columns.
 @end table
 @cindex wide output, printing
 Format some lines for output devices that have more than 80 columns.
 @end table
@@ -1484,8 +1573,8 @@ Print the name of the file before each string.
 @item --help
 Print a summary of the program usage on the standard output and exit.
 
 @item --help
 Print a summary of the program usage on the standard output and exit.
 
-@itemx -@var{min-len}
-@item -n @var{min-len}
+@item -@var{min-len}
+@itemx -n @var{min-len}
 @itemx --bytes=@var{min-len}
 Print sequences of characters that are at least @var{min-len} characters
 long, instead of the default 4.
 @itemx --bytes=@var{min-len}
 Print sequences of characters that are at least @var{min-len} characters
 long, instead of the default 4.
@@ -1520,7 +1609,7 @@ Print the program version number on the standard output and exit.
 @cindex symbols, discarding
 
 @smallexample
 @cindex symbols, discarding
 
 @smallexample
-strip [ -F @var{bfdname} | --target=@var{bfdname} | --target=@var{bfdname} ]
+strip [ -F @var{bfdname} | --target=@var{bfdname} ]
       [ -I @var{bfdname} | --input-target=@var{bfdname} ]
       [ -O @var{bfdname} | --output-target=@var{bfdname} ]
       [ -s | --strip-all ] [ -S | -g | --strip-debug ]
       [ -I @var{bfdname} | --input-target=@var{bfdname} ]
       [ -O @var{bfdname} | --output-target=@var{bfdname} ]
       [ -s | --strip-all ] [ -S | -g | --strip-debug ]
@@ -1626,15 +1715,16 @@ archives, @samp{strip -v} lists all members of the archive.
 
 @smallexample
 c++filt [ -_ | --strip-underscores ]
 
 @smallexample
 c++filt [ -_ | --strip-underscores ]
+        [ -j | --java ]
        [ -n | --no-strip-underscores ]
         [ -s @var{format} | --format=@var{format} ]
         [ --help ]  [ --version ]  [ @var{symbol}@dots{} ]
 @end smallexample
 
        [ -n | --no-strip-underscores ]
         [ -s @var{format} | --format=@var{format} ]
         [ --help ]  [ --version ]  [ @var{symbol}@dots{} ]
 @end smallexample
 
-The C++ language provides function overloading, which means that you can
-write many functions with the same name (providing each takes parameters
-of different types).  All C++ function names are encoded into a
-low-level assembly label (this process is known as
+The C++ and Java languages provides function overloading, which means
+that you can write many functions with the same name (providing each
+takes parameters of different types).  All C++ and Java function names
+are encoded into a low-level assembly label (this process is known as
 @dfn{mangling}). The @code{c++filt} program does the inverse mapping: it
 decodes (@dfn{demangles}) low-level names into user-level names so that
 the linker can keep these overloaded functions from clashing.
 @dfn{mangling}). The @code{c++filt} program does the inverse mapping: it
 decodes (@dfn{demangles}) low-level names into user-level names so that
 the linker can keep these overloaded functions from clashing.
@@ -1662,6 +1752,11 @@ of every name.  For example, the C name @code{foo} gets the low-level
 name @code{_foo}.  This option removes the initial underscore.  Whether
 @code{c++filt} removes the underscore by default is target dependent.
 
 name @code{_foo}.  This option removes the initial underscore.  Whether
 @code{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.
 @item -n
 @itemx --no-strip-underscores
 Do not remove the initial underscore.
@@ -1679,6 +1774,10 @@ the one used by the @sc{gnu} compiler (the default method)
 the one used by the Lucid compiler
 @item arm
 the one specified by the C++ Annotated Reference Manual
 the one used by the Lucid compiler
 @item arm
 the one specified by the C++ Annotated Reference Manual
+@item hp
+the one used by the HP compiler
+@item edg
+the one used by the EDG compiler
 @end table
 
 @item --help
 @end table
 
 @item --help
@@ -1855,7 +1954,7 @@ Displays (on standard error) the linker command line used by @code{nlmconv}.
 
 @item -l @var{linker}
 @itemx --linker=@var{linker}
 
 @item -l @var{linker}
 @itemx --linker=@var{linker}
-Use @var{linker} for any linking.  @var{linker} can be an abosolute or a
+Use @var{linker} for any linking.  @var{linker} can be an absolute or a
 relative pathname.
 
 @item -h
 relative pathname.
 
 @item -h
@@ -1972,10 +2071,15 @@ Specify an include directory to use when reading an @code{rc} file.
 option.  @code{windres} will also search this directory when looking for
 files named in the @code{rc} file.
 
 option.  @code{windres} will also search this directory when looking for
 files named in the @code{rc} file.
 
-@item --define @var{sym[=val]}
+@item -D @var{target}
+@itemx --define @var{sym[=val]}
 Specify a @code{-D} option to pass to the preprocessor when reading an
 @code{rc} file.
 
 Specify a @code{-D} option to pass to the preprocessor when reading an
 @code{rc} file.
 
+@item -v
+Enable verbose mode.  This tells you what the preprocessor is if you
+didn't specify one.
+
 @item --language @var{val}
 Specify the default language to use when reading an @code{rc} file.
 @var{val} should be a hexadecimal language code.  The low eight bits are
 @item --language @var{val}
 Specify the default language to use when reading an @code{rc} file.
 @var{val} should be a hexadecimal language code.  The low eight bits are
@@ -1992,6 +2096,372 @@ If @code{windres} is compiled with @code{YYDEBUG} defined as @code{1},
 this will turn on parser debugging.
 @end table
 
 this will turn on parser debugging.
 @end table
 
+
+@node dlltool
+@chapter Create files needed to build and use DLLs
+@cindex DLL
+@kindex dlltool
+
+@code{dlltool} may be used to create the files needed to build and use
+dynamic link libraries (DLLs).
+
+@quotation
+@emph{Warning:} @code{dlltool} is not always built as part of the binary
+utilities, since it is only useful for those targets which support DLLs.
+@end quotation
+
+@smallexample
+dlltool [-d|--input-def @var{def-file-name}]
+        [-b|--base-file @var{base-file-name}]
+        [-e|--output-exp @var{exports-file-name}]
+        [-z|--output-def @var{def-file-name}]
+        [-l|--output-lib @var{library-file-name}]        
+        [--export-all-symbols] [--no-export-all-symbols]
+        [--exclude-symbols @var{list}]
+        [--no-default-excludes]
+        [-S|--as @var{path-to-assembler}] [-f|--as-flags @var{options}]
+        [-D|--dllname @var{name}] [-m|--machine @var{machine}]
+        [-a|--add-indirect] [-U|--add-underscore] [-k|--kill-at]
+        [-A|--add-stdcall-alias]
+        [-x|--no-idata4] [-c|--no-idata5] [-i|--interwork]
+        [-n|--nodelete] [-v|--verbose] [-h|--help] [-V|--version]
+        [object-file @dots{}]
+@end smallexample
+
+@code{dlltool} reads its inputs, which can come from the @samp{-d} and
+@samp{-b} options as well as object files specified on the command
+line.  It then processes these inputs and if the @samp{-e} option has
+been specified it creates a exports file.  If the @samp{-l} option
+has been specified it creates a library file and if the @samp{-z} option
+has been specified it creates a def file.  Any or all of the -e, -l
+and -z options can be present in one invocation of dlltool.
+
+When creating a DLL, along with the source for the DLL, it is necessary
+to have three other files.  @code{dlltool} can help with the creation of
+these files.
+
+The first file is a @samp{.def} file which specifies which functions are
+exported from the DLL, which functions the DLL imports, and so on.  This
+is a text file and can be created by hand, or @code{dlltool} can be used
+to create it using the @samp{-z} option.  In this case @code{dlltool}
+will scan the object files specified on its command line looking for
+those functions which have been specially marked as being exported and
+put entries for them in the .def file it creates.
+
+In order to mark a function as being exported from a DLL, it needs to
+have an @samp{-export:<name_of_function>} entry in the @samp{.drectve}
+section of the object file.  This can be done in C by using the
+asm() operator:
+
+@smallexample
+  asm (".section .drectve");  
+  asm (".ascii \"-export:my_func\"");
+
+  int my_func (void) @{ @dots{} @}
+@end smallexample
+
+The second file needed for DLL creation is an exports file.  This file
+is linked with the object files that make up the body of the DLL and it
+handles the interface between the DLL and the outside world.  This is a
+binary file and it can be created by giving the @samp{-e} option to
+@code{dlltool} when it is creating or reading in a .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 @samp{-l} option to dlltool when it
+is creating or reading in a .def file.
+
+@code{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 @samp{-S} command line option can be
+used to specify the path to the assembler that dlltool will use,
+and the @samp{-f} option can be used to pass specific flags to that
+assembler.  The @samp{-n} can be used to prevent dlltool from deleting
+these temporary assembler files when it is done, and if @samp{-n} is
+specified twice then this will prevent dlltool from deleting the
+temporary object files it used to build the library.
+
+Here is an example of creating a DLL from a source file @samp{dll.c} and
+also creating a program (from an object file called @samp{program.o})
+that uses that DLL:
+
+@smallexample
+  gcc -c dll.c
+  dlltool -e exports.o -l dll.lib dll.o
+  gcc dll.o exports.o -o dll.dll
+  gcc program.o dll.lib -o program
+@end smallexample
+
+The command line options have the following meanings:
+
+@table @code
+
+@item -d @var{filename}
+@itemx --input-def @var{filename}
+@cindex input .def file
+Specifies the name of a .def file to be read in and processed.
+
+@item -b @var{filename}
+@itemx --base-file @var{filename}
+@cindex base files
+Specifies the name of a base file to be read in and processed.  The
+contents of this file will be added to the relocation section in the
+exports file generated by dlltool.
+
+@item -e @var{filename}
+@itemx --output-exp @var{filename}
+Specifies the name of the export file to be created by dlltool.
+
+@item -z @var{filename}
+@itemx --output-def @var{filename}
+Specifies the name of the .def file to be created by dlltool.
+
+@item -l @var{filename}
+@itemx --output-lib @var{filename}
+Specifies the name of the 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
+are not exported by default; see the @code{--no-default-excludes}
+option.  You may add to the list of symbols to not export by using the
+@code{--exclude-symbols} option.
+
+@item --no-export-all-symbols
+Only export symbols explicitly listed in an input .def file or in
+@samp{.drectve} sections in the input object files.  This is the default
+behaviour.  The @samp{.drectve} sections are created by @samp{dllexport}
+attributes in the source code.
+
+@item --exclude-symbols @var{list}
+Do not export the symbols in @var{list}.  This is a list of symbol names
+separated by comma or colon characters.  The symbol names should not
+contain a leading underscore.  This is only meaningful when
+@code{--export-all-symbols} is used.
+
+@item --no-default-excludes
+When @code{--export-all-symbols} is used, it will by default avoid
+exporting certain special symbols.  The current list of symbols to avoid
+exporting is @samp{DllMain@@12}, @samp{DllEntryPoint@@0},
+@samp{impure_ptr}.  You may use the @code{--no-default-excludes} option
+to go ahead and export these special symbols.  This is only meaningful
+when @code{--export-all-symbols} is used.
+
+@item -S @var{path}
+@itemx --as @var{path}
+Specifies the path, including the filename, of the assembler to be used
+to create the exports file.
+
+@item -f @var{switches}
+@itemx --as-flags @var{switches}
+Specifies any specific command line switches to be passed to the
+assembler when building the exports file.  This option will work even if
+the @samp{-S} option is not used.  This option only takes one argument,
+and if it occurs more than once on the command line, then later
+occurrences will override earlier occurrences.  So if it is necessary to
+pass multiple switches to the assembler they should be enclosed in
+double quotes.
+
+@item -D @var{name}
+@itemx --dll-name @var{name}
+Specifies the name to be stored in the .def file as the name of the DLL
+when the @samp{-e} option is used.  If this option is not present, then
+the filename given to the @samp{-e} option will be used as the name of
+the DLL.
+
+@item -m @var{machine}
+@itemx -machine @var{machine}
+Specifies the type of machine for which the library file should be
+built.  @code{dlltool} has a built in default type, depending upon how
+it was created, but this option can be used to override that.  This is
+normally only useful when creating DLLs for an ARM processor, when the
+contents of the DLL are actually encode using THUMB instructions.
+
+@item -a
+@itemx --add-indirect
+Specifies that when @code{dlltool} is creating the exports file it
+should add a section which allows the exported functions to be
+referenced without using the import library.  Whatever the hell that
+means! 
+
+@item -U
+@itemx --add-underscore
+Specifies that when @code{dlltool} is creating the exports file it
+should prepend an underscore to the names of the exported functions. 
+
+@item -k
+@itemx --kill-at
+Specifies that when @code{dlltool} is creating the exports file it
+should not append the string @samp{@@ <number>}.  These numbers are
+called ordinal numbers and they represent another way of accessing the
+function in a DLL, other than by name.
+
+@item -A
+@itemx --add-stdcall-alias
+Specifies that when @code{dlltool} is creating the exports file it
+should add aliases for stdcall symbols without @samp{@@ <number>}
+in addition to the symbols with @samp{@@ <number>}.
+
+@item -x
+@itemx --no-idata4
+Specifies that when @code{dlltool} is creating the exports and library
+files it should omit the .idata4 section.  This is for compatibility
+with certain operating systems.
+
+@item -c
+@itemx --no-idata5
+Specifies that when @code{dlltool} is creating the exports and library
+files it should omit the .idata5 section.  This is for compatibility
+with certain operating systems.
+
+@item -i
+@itemx --interwork
+Specifies that @code{dlltool} should mark the objects in the library
+file and exports file that it produces as supporting interworking
+between ARM and THUMB code.
+
+@item -n
+@itemx --nodelete
+Makes @code{dlltool} preserve the temporary assembler files it used to
+create the exports file.  If this option is repeated then dlltool will
+also preserve the temporary object files it uses to create the library
+file. 
+
+@item -v
+@itemx --verbose
+Make dlltool describe what it is doing.
+
+@item -h
+@itemx --help
+Displays a list of command line options and then exits.
+
+@item -V
+@itemx --version
+Displays dlltool's version number and then exits.
+
+@end table
+
+@node readelf
+@chapter readelf
+
+@cindex ELF file information
+@kindex readelf
+
+@smallexample
+readelf [ -a | --all ] 
+        [ -h | --file-header]
+        [ -l | --program-headers | --segments]
+        [ -S | --section-headers | --sections]
+        [ -e | --headers]
+        [ -s | --syms | --symbols]
+        [ -r | --relocs]
+        [ -d | --dynamic]
+        [ -V | --version-info]
+        [ -D | --use-dynamic]
+        [ -x <number> | --hex-dump=<number>]
+        [ -w[liapr] | --debug-dump[=info,=line,=abbrev,=pubnames,=ranges]]
+        [      --histogram]
+        [ -v | --version]
+        [ -H | --help]
+        @var{elffile}@dots{}
+@end smallexample
+
+@code{readelf} displays information about one or more ELF format object
+files.  The options control what particular information to display.
+
+@var{elffile}@dots{} are the object files to be examined.  At the
+moment, @code{readelf} does not support examining archives, nor does it
+support examing 64 bit ELF files.
+
+The long and short forms of options, shown here as alternatives, are
+equivalent.  At least one option besides @samp{-v} or @samp{-H} must be
+given. 
+
+@table @code
+@item -a
+@itemx --all
+Equivalent to specifiying @samp{--file-header},
+@samp{--program-headers}, @samp{--sections}, @samp{--symbols},
+@samp{--relocs}, @samp{--dynamic} and @samp{--version-info}.
+
+@item -h
+@itemx --file-header
+@cindex ELF file header information
+Displays the information contained in the ELF header at the start of the
+file.
+
+@item -l
+@itemx --program-headers
+@itemx --segments
+@cindex ELF program header information
+@cindex ELF segment information
+Displays the information contained in the file's segment headers, if it
+has any.
+
+@item -S
+@itemx --sections
+@itemx --section-headers
+@cindex ELF section information
+Displays the information contained in the file's section headers, if it
+has any.
+
+@item -s
+@itemx --symbols
+@itemx --syms
+@cindex ELF symbol table information
+Displays the entries in symbol table section of the file, if it has one.
+
+@item -e
+@itemx --headers
+Display all the headers in the file.  Equivalent to @samp{-h -l -S}.
+
+@item -r
+@itemx --relocs
+@cindex ELF reloc information
+Displays the contents of the file's relocation section, if it ha one.
+
+@item -d
+@itemx --dynamic
+@cindex ELF dynamic section information
+Displays the contents of the file's dynamic section, if it has one.
+
+@item -V
+@itemx --version-info
+@cindex ELF version sections informations
+Displays the contents of the version sections in the file, it they
+exist.
+
+@item -D
+@itemx --use-dynamic
+When displaying symbols, this option makes @code{readelf} use the
+symblol table in the file's dynamic section, rather than the one in the
+symbols section.
+
+@item -x <number>
+@itemx --hex-dump=<number>
+Displays the contents of the indicated section as a hexadecimal dump.
+
+@item -w[liapr]
+@itemx --debug-dump[=line,=info,=abbrev,=pubnames,=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.
+
+@item --histogram
+Display a histogram of bucket list lengths when displaying the contents
+of the symbol tables.
+
+@item -v
+@itemx --version
+Display the version number of readelf.
+
+@item -H
+@itemx --help
+Display the command line options understood by @code{readelf}.
+
+@end table
+
+
 @node Selecting The Target System
 @chapter Selecting the target system
 
 @node Selecting The Target System
 @chapter Selecting the target system
 
@@ -2305,7 +2775,7 @@ individuals in the file @file{etc/SERVICE} in the @sc{gnu} Emacs
 distribution.
 
 In any event, we also recommend that you send bug reports for the binary
 distribution.
 
 In any event, we also recommend that you send bug reports for the binary
-utilities to @samp{bug-gnu-utils@@prep.ai.mit.edu}.
+utilities to @samp{bug-gnu-utils@@gnu.org}.
 
 The fundamental principle of reporting bugs usefully is this:
 @strong{report all the facts}.  If you are not sure whether to state a
 
 The fundamental principle of reporting bugs usefully is this:
 @strong{report all the facts}.  If you are not sure whether to state a
This page took 0.034994 seconds and 4 git commands to generate.