@end ifinfo
@ifinfo
-Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 1998 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
@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, 92, 93, 94, 95, 96, 97, 1998 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.
Discard symbols
@item c++filt
-Demangle encoded C++ symbols
+Demangle encoded C++ symbols (on MS-DOS, this program is named
+@code{cxxfilt})
@item addr2line
Convert addresses into file names and line numbers
* strings:: List printable strings from files
* strip:: Discard symbols
* c++filt:: Filter to demangle encoded C++ symbols
+* 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
@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}.
[ -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} ]
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
[ -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 ]
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
archives, @samp{strip -v} lists all members of the archive.
@end table
-@node c++filt
+@node c++filt, addr2line, strip, Top
@chapter c++filt
@kindex c++filt
@smallexample
c++filt [ -_ | --strip-underscores ]
+ [ -j | --java ]
[ -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
-@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.
+@kindex cxxfilt
+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}
+@footnote{MS-DOS does not allow @kbd{+} characters in file names, so on
+MS-DOS this program is named @code{cxxfilt}.}
+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.
Every alphanumeric word (consisting of letters, digits, underscores,
dollars, or periods) seen in the input is a potential label. If the
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.
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
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.
+@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
@end quotation
@smallexample
-dlltool [-d|--input-def <def-file-name>]
- [-b|--base-file <base-file-name>]
- [-e|--output-exp <exports-file-name>]
- [-z|--output-def <def-file-name>]
- [-l|--output-lib <library-file-name>]
- [-S|--as <path-to-assembler>] [-f|--as-flags <options>]
- [-D|--dllname <name>] [-m|--machine <machine>]
+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{}]
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{.drective}
+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 .drective");
+ asm (".section .drectve");
asm (".ascii \"-export:my_func\"");
int my_func (void) @{ @dots{} @}
@table @code
-@item -d FILENAME
-@itemx --input-def FILENAME
+@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 FILENAME
-@itemx --base-file FILENAME
+@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 FILENAME
-@itemx --output-exp FILENAME
+@item -e @var{filename}
+@itemx --output-exp @var{filename}
Specifies the name of the export file to be created by dlltool.
-@item -z FILENAME
-@itemx --output-def FILENAME
+@item -z @var{filename}
+@itemx --output-def @var{filename}
Specifies the name of the .def file to be created by dlltool.
-@item -l FILENAME
-@itemx --output-lib FILENAME
+@item -l @var{filename}
+@itemx --output-lib @var{filename}
Specifies the name of the library file to be created by dlltool.
-@item -S PATH
-@itemx --as PATH
+@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 SWITCHES
-@itemx --as-flags SWITCHES
+@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,
pass multiple switches to the assembler they should be enclosed in
double quotes.
-@item -D NAME
-@itemx --dll-name NAME
+@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 MACHINE
-@itemx -machine MACHINE
+@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
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
readelf [ -a | --all ]
[ -h | --file-header]
[ -l | --program-headers | --segments]
- [ -S | --sections]
- [ -s | --symbols]
+ [ -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{}
@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
@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.