* Makefile.in: Note dependencies on bucomm.h.

(cplus-dem.o): Link c++filt with version.o.

	* strings.c: Include bucomm.h and add prototypes to other decls.
	Remove -h option.

	* bucomm.h: Declare xrealloc.

	* nm.c, objcopy.c, objdump.c, size.c, strings.c (main, usage): Add
	--help option.  Put "GNU" in the version message.
	(usage): Take stream and exit status as args.
	(main): Pass new args to usage.
This commit is contained in:
David MacKenzie
1993-06-28 02:17:13 +00:00
parent 6214895281
commit b26ac61376
9 changed files with 501 additions and 221 deletions

View File

@ -554,7 +554,7 @@ objcopy [ -F @var{format} | --format=@var{format} ]
[ -O @var{format} | --output-format=@var{format} ] [ -O @var{format} | --output-format=@var{format} ]
[ -S | --strip-all ] [ -g | --strip-debug ] [ -S | --strip-all ] [ -g | --strip-debug ]
[ -x | --discard-all ] [ -X | --discard-locals ] [ -x | --discard-all ] [ -X | --discard-locals ]
[ -v | --verbose ] [ -V | --version ] [ -v | --verbose ] [ -V | --version ] [ --help ]
@var{infile} [@var{outfile}] @var{infile} [@var{outfile}]
@end smallexample @end smallexample
@ -619,6 +619,9 @@ Show the version number of @code{objcopy}.
@itemx --verbose @itemx --verbose
Verbose output: list all object files modified. In the case of Verbose output: list all object files modified. In the case of
archives, @samp{objcopy -V} lists all members of the archive. archives, @samp{objcopy -V} lists all members of the archive.
@item --help
Show a summary of the options to @code{objcopy}.
@end table @end table
@iftex @iftex
@ -642,7 +645,7 @@ nm [ -a | --debug-syms ] [ -g | --extern-only ]
[ -r | --reverse-sort ] [ -u | --undefined-only ] [ -r | --reverse-sort ] [ -u | --undefined-only ]
[ -t @var{radix} | --radix=@var{radix} ] [ -P | --portability ] [ -t @var{radix} | --radix=@var{radix} ] [ -P | --portability ]
[ --target=@var{bfdname} ] [ -f @var{format} | --format=@var{format} ] [ --target=@var{bfdname} ] [ -f @var{format} | --format=@var{format} ]
[ -V | --version ] [ @var{objfile}@dots{} ] [ -V | --version ] [ --help ] [ @var{objfile}@dots{} ]
@end smallexample @end smallexample
GNU @code{nm} lists the symbols from object files @var{objfile}@dots{}. GNU @code{nm} lists the symbols from object files @var{objfile}@dots{}.
@ -714,7 +717,7 @@ listed.
@itemx --format=@var{format} @itemx --format=@var{format}
Use the output format @var{format}, which can be @code{bsd}, Use the output format @var{format}, which can be @code{bsd},
@code{sysv}, or @code{posix}. The default is @code{bsd}. @code{sysv}, or @code{posix}. The default is @code{bsd}.
Only the first character of @var{format} is significant, it can be Only the first character of @var{format} is significant; it can be
either upper or lower case. either upper or lower case.
@item -g @item -g
@ -722,6 +725,12 @@ either upper or lower case.
@cindex external symbols @cindex external symbols
Display only external symbols. Display only external symbols.
@item -n
@itemx -v
@itemx --numeric-sort
Sort symbols numerically by their addresses, rather than alphabetically
by their names.
@item -p @item -p
@itemx --no-sort @itemx --no-sort
@cindex sorting symbols @cindex sorting symbols
@ -733,12 +742,6 @@ encountered.
Use the POSIX.2 standard output format instead of the default format. Use the POSIX.2 standard output format instead of the default format.
Equivalent to @samp{-f posix}. Equivalent to @samp{-f posix}.
@item -n
@itemx -v
@itemx --numeric-sort
Sort symbols numerically by their addresses, rather than alphabetically
by their names.
@item -s @item -s
@itemx --print-armap @itemx --print-armap
@cindex symbol index, listing @cindex symbol index, listing
@ -769,7 +772,10 @@ Display only undefined symbols (those external to each object file).
@item -V @item -V
@itemx --version @itemx --version
Show the version number of @code{nm}. Show the version number of @code{nm} and exit.
@item --help
Show a summary of the options to @code{nm} and exit.
@end table @end table
@node objdump, ranlib, nm, Top @node objdump, ranlib, nm, Top
@ -781,8 +787,8 @@ Show the version number of @code{nm}.
@smallexample @smallexample
objdump [ -a ] [ -b @var{bfdname} ] [ -d ] [ -f ] objdump [ -a ] [ -b @var{bfdname} ] [ -d ] [ -f ]
[ -h | --header ] [ -i ] [ -j @var{section} ] [ -l ] [ -h | --header ] [ -i ] [ -j @var{section} ] [ -l ]
[ -m @var{machine} ] [ -r | --reloc ] [ -s ] [ -m @var{machine} ] [ -r | --reloc ] [ -s ] [ --stabs ]
[ --stabs ] [ -t | --syms ] [ -x ] [ -t | --syms ] [ -x ] [ --version ] [ --help ]
@var{objfile}@dots{} @var{objfile}@dots{}
@end smallexample @end smallexample
@ -792,14 +798,14 @@ information is mostly useful to programmers who are working on the
compilation tools, as opposed to programmers who just want their compilation tools, as opposed to programmers who just want their
program to compile and work. program to compile and work.
@var{objfile}@dots{} are the object files to be examined. When you
specify archives, @code{objdump} shows information on each of the member
object files.
The long and short forms of options, shown here as alternatives, are The long and short forms of options, shown here as alternatives, are
equivalent. equivalent.
@table @code @table @code
@item @var{objfile}@dots{}
The object files to be examined. When you specify archives,
@code{objdump} shows information on each of the member object files.
@item -a @item -a
@c print_arelt_descr @c print_arelt_descr
@cindex archive headers @cindex archive headers
@ -842,6 +848,9 @@ each of the @var{objfile} files.
Header. Display summary information from the section headers of the Header. Display summary information from the section headers of the
object file. object file.
@item --help
Print a summary of the options to @code{objdump} and exit.
@item -i @item -i
@cindex architectures available @cindex architectures available
@cindex object formats available @cindex object formats available
@ -895,13 +904,15 @@ output.
Symbol Table. Print the symbol table entries of the file. Symbol Table. 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.
@item --version
Print the version number of @code{objdump} and exit.
@item -x @item -x
@cindex all header information, object file @cindex all header information, object file
@cindex header information, all @cindex header information, all
Display all available header information, including the symbol table and Display all available header information, including the symbol table and
relocation entries. Using @samp{-x} is equivalent to specifying all of relocation entries. Using @samp{-x} is equivalent to specifying all of
@samp{-a -f -h -r -t}. @samp{-a -f -h -r -t}.
@end table @end table
@node ranlib, size, objdump, Top @node ranlib, size, objdump, Top
@ -953,11 +964,11 @@ size---for each of the object or archive files @var{objfile} in its
argument list. By default, one line of output is generated for each argument list. By default, one line of output is generated for each
object file or each module in an archive. object file or each module in an archive.
The command line options have the following meanings: @var{objfile}@dots{} are the object files to be examined.
@table @code
@item @var{objfile}@dots{}
The object files to be examined.
The command line options have the following meanings:
@table @code
@item -A @item -A
@itemx -B @itemx -B
@itemx --format=@var{compatibility} @itemx --format=@var{compatibility}
@ -1038,7 +1049,7 @@ Display the version number of @code{size}.
@cindex strings, printing @cindex strings, printing
@smallexample @smallexample
strings [-afhov] [-n @var{min-len}] [-@var{min-len}] [-t @var{radix}] [-] strings [-afov] [-@var{min-len}] [-n @var{min-len}] [-t @var{radix}] [-]
[--all] [--print-file-name] [--bytes=@var{min-len}] [--radix=@var{radix}] [--all] [--print-file-name] [--bytes=@var{min-len}] [--radix=@var{radix}]
[--help] [--version] @var{file}@dots{} [--help] [--version] @var{file}@dots{}
@end smallexample @end smallexample
@ -1064,20 +1075,19 @@ the whole files.
@itemx --print-file-name @itemx --print-file-name
Print the name of the file before each string. Print the name of the file before each string.
@item -h @item --help
@itemx --help
Print a summary of the program usage on the standard output and exit. Print a summary of the program usage on the standard output and exit.
@item -n @var{min-len}
@itemx -@var{min-len} @itemx -@var{min-len}
@item -n @var{min-len}
@itemx --bytes=@var{min-len} @itemx --bytes=@var{min-len}
Print sequences of characters that are at least @var{min-len} characters Print sequences of characters that are at least @var{min-len} characters
long, instead of the default 4. long, instead of the default 4.
@item -o @item -o
Like @samp{-t o}. Like @samp{-t o}. Some other versions of @code{strings} have @samp{-o}
Some other versions of @code{strings} have @samp{-o} act like @samp{-t d} instead. act like @samp{-t d} instead. Since we can not be compatible with both
Since we can not be compatible with both ways, we simply chose one. ways, we simply chose one.
@item -t @var{radix} @item -t @var{radix}
@itemx --radix=@var{radix} @itemx --radix=@var{radix}
@ -1104,19 +1114,27 @@ strip [ -F @var{format} | --format=@var{format} | --target=@var{format} ]
[ -O @var{format} | --output-format=@var{format} ] [ -O @var{format} | --output-format=@var{format} ]
[ -s | --strip-all ] [ -S | -g | --strip-debug ] [ -s | --strip-all ] [ -S | -g | --strip-debug ]
[ -x | --discard-all ] [ -X | --discard-locals ] [ -x | --discard-all ] [ -X | --discard-locals ]
[ -v | --verbose ] [ -V | --version ] [ -v | --verbose ] [ -V | --version ] [ --help ]
@var{objfile}@dots{} @var{objfile}@dots{}
@end smallexample @end smallexample
GNU @code{strip} discards all symbols from object files GNU @code{strip} discards all symbols from object files
@var{objfile}. The list of object files may include archives. @var{objfile}. The list of object files may include archives.
At least one object file must be given.
@code{strip} will not execute unless at least one object file is listed.
@code{strip} modifies the files named in its argument, @code{strip} modifies the files named in its argument,
rather than writing modified copies under different names. rather than writing modified copies under different names.
@table @code @table @code
@item -F @var{format}
@itemx --format=@var{format}
@itemx --target=@var{format}
Treat the original @var{objfile} as a file with the object
code format @var{format}, and rewrite it in the same format.
@item --help
Show a summary of the options to @code{strip} and exit.
@item -I @var{format} @item -I @var{format}
@itemx --input-format=@var{format} @itemx --input-format=@var{format}
Treat the original @var{objfile} as a file with the object Treat the original @var{objfile} as a file with the object
@ -1126,12 +1144,6 @@ code format @var{format}.
@itemx --output-format=@var{format} @itemx --output-format=@var{format}
Replace @var{objfile} with a file in the output format @var{format}. Replace @var{objfile} with a file in the output format @var{format}.
@item -F @var{format}
@itemx --format=@var{format}
@itemx --target=@var{format}
Treat the original @var{objfile} as a file with the object
code format @var{format}, and rewrite it in the same format.
@item -s @item -s
@itemx --strip-all @itemx --strip-all
Remove all symbols. Remove all symbols.
@ -1166,10 +1178,16 @@ archives, @samp{strip -v} lists all members of the archive.
@kindex c++filt @kindex c++filt
@cindex demangling C++ symbols @cindex demangling C++ symbols
@smallexample
c++filt [ -_ | --strip-underscores ]
[ -s @var{format} | --format=@var{format} ]
[ --help ] [ --version ] [ @var{arg}@dots{} ]
@end smallexample
The C++ language provides function overloading, which means that you can The C++ language provides function overloading, which means that you can
write many functions with the same name (providing each takes parameters write many functions with the same name (providing each takes parameters
of different types). All C++ function names are encoded into a of different types). All C++ function names are encoded into a
low-level assembly label (in some circles this is described as low-level assembly label (this process is known as
@dfn{mangling}). The @code{c++filt} program does the inverse mapping: it @dfn{mangling}). The @code{c++filt} program does the inverse mapping: it
decodes (@dfn{demangles}) low-level names into user-level names so that decodes (@dfn{demangles}) low-level names into user-level names so that
the linker can keep these overloaded functions from clashing. the linker can keep these overloaded functions from clashing.
@ -1194,10 +1212,34 @@ c++filt @var{symbol}
All results are printed on the standard output. All results are printed on the standard output.
Note that on some systems, both the C and C++ compilers put an @table @code
underscore in front of every name. (I.e. the C name @code{foo} gets the @item -_
low-level name @code{_foo}.) On such systems, @code{c++filt} removes @item --strip-underscores
any initial underscore of a potential label. On some systems, both the C and C++ compilers put an underscore in front
of every name. For example, the C name @code{foo} gets the low-level
name @code{_foo}. This option removes the initial underscore.
@item -s @var{format}
@itemx --format=@var{format}
GNU @code{nm} can decode three different methods of mangling, used by
different C++ compilers. The argument to this option selects which
method it uses:
@table @code
@item gnu
the one used by the GNU compiler (the default method)
@item lucid
the one used by the Lucid compiler
@item arm
the one specified by the C++ Annotated Reference Manual
@end table
@item --help
Print a summary of the options to @code{c++filt} and exit.
@item --version
Print the version number of @code{c++filt} and exit.
@end table
@quotation @quotation
@emph{Warning:} @code{c++filt} is a new utility, and the details of its @emph{Warning:} @code{c++filt} is a new utility, and the details of its
@ -1206,14 +1248,14 @@ a command-line option may be required in the the future to decode a name
passed as an argument on the command line; in other words, passed as an argument on the command line; in other words,
@example @example
c++filt @var{SYMBOL} c++filt @var{symbol}
@end example @end example
@noindent @noindent
may in a future release become may in a future release become
@example @example
c++filt @var{flag} @var{SYMBOL} c++filt @var{option} @var{symbol}
@end example @end example
@end quotation @end quotation

View File

@ -8,30 +8,35 @@
.. ..
.SH NAME .SH NAME
c++filt\(em\&demangles C++ symbols c++filt\(em\&demangle C++ symbols
.SH SYNOPSIS .SH SYNOPSIS
.hy 0
.na
.TP
.B c++filt .B c++filt
[ .RB "[\|" \-_ | \-\-strip-underscores "\|]"
.B -_ .RB "[\|" "\-s {gnu,lucid,arm} " | " \-\-format={gnu,lucid,arm}" "\|]"
] .RB "[\|" \-\-help "\|]"
.RB "[\|" \-\-version "\|]"
.RB "[\|" arg "...\|]"
.SH DESCRIPTION .SH DESCRIPTION
The C++ language provides function overloading, which means that you can The C++ language provides function overloading, which means that you can
write many functions with the same name (providing each takes parameters write many functions with the same name (providing each takes parameters
of different types). All C++ function names are encoded into a of different types). All C++ function names are encoded into a
low-level assembly label (in some circles this is described as low-level assembly label (this process is known as
@dfn{mangling}). The .I mangling\c
). The
.B c++filt .B c++filt
program does the inverse mapping: it decodes (\fIdemangles\fR) program does the inverse mapping: it decodes (\fIdemangles\fR)
low-level names into user-level names so that the linker can keep low-level names into user-level names so that the linker can keep
these overloaded functions from clashing. these overloaded functions from clashing.
.PP
Every alphanumeric word (consisting of letters, digits, underscores, Every alphanumeric word (consisting of letters, digits, underscores,
dollars, or periods) seen in the input is a potential label. If the dollars, or periods) seen in the input is a potential label. If the
label decodes into a C++ name, the C++ name replaces the low-level label decodes into a C++ name, the C++ name replaces the low-level
name in the output. name in the output.
.PP
A typical use of A typical use of
.B c++filt .B c++filt
is to pipe the output of is to pipe the output of
@ -43,22 +48,48 @@ as a filter:
.RS .RS
.B nm \fIobjfile\fB | c++filt .B nm \fIobjfile\fB | c++filt
.RE .RE
.PP
You can also use You can also use
.B c++filt .B c++filt
to decipher individual symbols by specifying these symbols on the to decipher individual symbols by specifying these symbols on the
command line. command line.
.PP
All results are printed on the standard output. All results are printed on the standard output.
.SH OPTIONS
Note that on some systems, both the C and C++ compilers put an .TP
underscore in front of every name. (I.e. the C name .B \-_
.TP
.B \-\-strip\-underscores
On some systems, both the C and C++ compilers put an
underscore in front of every name. For example, the C name
.B foo .B foo
gets the low-level name gets the low-level name
.BR _foo .) .BR _foo .
To remove the leading underscore, specify the option This option removes the leading underscore.
.B -_
on the command line. .TP
.B "\-s {gnu,lucid,arm}"
.TP
.B \-\-format={gnu,lucid,arm}
GNU
.B nm
can decode three different methods of mangling, used by different C++
compilers. This option selects which method it uses: the one used by
the GNU compiler, the one used by the Lucid compiler, or the one
specified by the C++ Annotated Reference Manual. The default is the
GNU style.
.TP
.B \-\-help
Print a summary of the options to
.B c++filt
and exit.
.TP
.B \-\-version
Print the version number of
.B c++filt
and exit.
.SH "SEE ALSO" .SH "SEE ALSO"
.RB "`\|" binutils "\|'" .RB "`\|" binutils "\|'"

View File

@ -23,9 +23,12 @@ nm\(em\&list symbols from object files.
.RB "[\|" \-p | \-\-no\-sort "\|]" .RB "[\|" \-p | \-\-no\-sort "\|]"
.RB "[\|" \-r | \-\-reverse\-sort "\|]" .RB "[\|" \-r | \-\-reverse\-sort "\|]"
.RB "[\|" \-u | \-\-undefined\-only "\|]" .RB "[\|" \-u | \-\-undefined\-only "\|]"
.RB "[\|" "\-\-target="\c .RB "[\|" \-\-help "\|]"
.I bfdname\c .RB "[\|" \-\-version "\|]"
\&\|] .RB "[\|" "\-t \fIradix" | \-\-radix=\fIradix "\|]"
.RB "[\|" \-P | --portability "\|]"
.RB "[\|" "\-f \fIformat" | \-\-format=\fIformat "\|]"
.RB "[\|" "\-\-target=\fIbfdname" "\|]"
.RB "[\|" \c .RB "[\|" \c
.I objfile\c .I objfile\c
\&.\|.\|.\|] \&.\|.\|.\|]
@ -34,22 +37,27 @@ nm\(em\&list symbols from object files.
.SH DESCRIPTION .SH DESCRIPTION
GNU \c GNU \c
.B nm\c .B nm\c
\& will list the symbols from object files \c \& lists the symbols from object files \c
.I objfile\c .I objfile\c
\&. \&. If no object files are given as arguments, \c
.B nm\c
\& assumes `\|\c
.B a.out\c
\|'.
.SH OPTIONS .SH OPTIONS
The long and short forms of options, shown here as alternatives, are The long and short forms of options, shown here as alternatives, are
equivalent. equivalent.
.TP .TP
.IR "objfile" .\|.\|. .B \-A
Object files whose symbols are to be listed. If no object files are .TP
listed as arguments, \c .B \-o
.B nm\c .TP
\& assumes `\|\c .B \-\-print\-file\-name
.B a.out\c Precede each symbol by the name of the input file where it was found,
\|'. rather than identifying the input file once only before all of its
symbols.
.TP .TP
.B \-a .B \-a
@ -57,12 +65,28 @@ listed as arguments, \c
.B \-\-debug\-syms .B \-\-debug\-syms
Display debugger-only symbols; normally these are not listed. Display debugger-only symbols; normally these are not listed.
.TP
.B "\-f \fIformat"
Use the output format \fIformat\fP, which can be ``bsd'',
``sysv'', or ``posix''. The default is `bsd''.
Only the first character of \fIformat\fP is significant; it can be
either upper or lower case.
.TP .TP
.B \-g .B \-g
.TP .TP
.B \-\-extern\-only .B \-\-extern\-only
Display only external symbols. Display only external symbols.
.TP
.B \-n
.TP
.B \-v
.TP
.B \-\-numeric\-sort
Sort symbols numerically by their addresses, not alphabetically by their
names.
.TP .TP
.B \-p .B \-p
.TP .TP
@ -71,11 +95,11 @@ Don't bother to sort the symbols in any order; just print them in the
order encountered. order encountered.
.TP .TP
.B \-n .B \-P
.TP .TP
.B \-\-numeric\-sort .B \-\-portability
Sort symbols numerically by their addresses, not alphabetically by their Use the POSIX.2 standard output format instead of the default format.
names. Equivalent to ``\-f posix''.
.TP .TP
.B \-s .B \-s
@ -89,14 +113,6 @@ When listing symbols from archive members, include the index: a mapping
\&) of what modules \&) of what modules
contain definitions for what names. contain definitions for what names.
.TP
.B \-o
.TP
.B \-\-print\-file\-name
Precede each symbol by the name of the input file where it was found,
rather than identifying the input file once only before all of its
symbols.
.TP .TP
.B \-r .B \-r
.TP .TP
@ -105,7 +121,14 @@ Reverse the sense of the sort (whether numeric or alphabetic); let the
last come first. last come first.
.TP .TP
.BI "\-\-target " "bfdname"\c .B "\-t \fIradix"
.TP
.B "\-\-radix=\fIradix"
Use \fIradix\fP as the radix for printing the symbol values. It must be
``d'' for decimal, ``o'' for octal, or ``x'' for hexadecimal.
.TP
.BI "\-\-target=" "bfdname"\c
\& \&
Specify an object code format other than your system's default format. Specify an object code format other than your system's default format.
See See
@ -118,7 +141,19 @@ for information on listing available formats.
.B \-\-undefined\-only .B \-\-undefined\-only
Display only undefined symbols (those external to each object file). Display only undefined symbols (those external to each object file).
.PP .TP
.B \-V
.TP
.B \-\-version
Show the version number of
.B nm
and exit.
.TP
.B \-\-help
Show a summary of the options to
.B nm
and exit.
.SH "SEE ALSO" .SH "SEE ALSO"
.RB "`\|" binutils "\|'" .RB "`\|" binutils "\|'"

View File

@ -8,48 +8,25 @@
.. ..
.SH NAME .SH NAME
objcopy\(em\&copies and translates object files objcopy\(em\&copy and translate object files
.SH SYNOPSIS .SH SYNOPSIS
.hy 0 .hy 0
.na .na
.TP
.B objcopy .B objcopy
.RS .RB "[\|" \-F \fIformat\fB | \-\-format=\fIformat\fB "\|]"
[ .RB "[\|" \-I \fIformat\fB | \-\-input\-format=\fIformat\fB "\|]"
.B -F \fIformat\fB | --format=\fIformat\fB .RB "[\|" \-O \fIformat\fB | \-\-output\-format=\fIformat\fB "\|]"
] .RB "[\|" \-S | \-\-strip\-all "\|]"
.br .RB "[\|" \-g | \-\-strip\-debug "\|]"
[ .RB "[\|" \-x | \-\-discard\-all "\|]"
.B -I \fIformat\fB | --input-format=\fIformat\fB .RB "[\|" \-X | \-\-discard\-locals "\|]"
] .RB "[\|" \-v | \-\-verbose "\|]"
.br .RB "[\|" \-V | \-\-version "\|]"
[ .RB "[\|" \-\-help "\|]"
.B -O \fIformat\fB | --output-format=\fIformat\fB .B infile
] .RB "[\|" outfile "\|]"
.br
[
.B -S | --strip-all
] [
.B -g | --strip-debug
]
.br
[
.B -x | --discard-all
] [
.B -X | --discard-locals
]
.br
[
.B -v | --verbose
] [
.B -V | --version
]
.br
.I infile
[
.I outfile
]
.RE
.SH DESCRIPTION .SH DESCRIPTION
The GNU The GNU
.B objcopy .B objcopy
@ -60,7 +37,7 @@ write the destination object file in a format different from that of
the source object file. The exact behavior of the source object file. The exact behavior of
.B objcopy .B objcopy
is controlled by command-line options. is controlled by command-line options.
.PP
.B objcopy .B objcopy
creates temporary files to do its translations and deletes them creates temporary files to do its translations and deletes them
afterward. afterward.
@ -68,51 +45,77 @@ afterward.
uses BFD to do all its translation work; it knows about all the uses BFD to do all its translation work; it knows about all the
formats BFD knows about, and thus is able to recognize most formats formats BFD knows about, and thus is able to recognize most formats
without being told explicitly. without being told explicitly.
.PP
.SH OPTIONS .I infile
.TP 0.5i and
.I infile\fR,\fI outfile .I outfile
The source and output files respectively. If you do not specify are the source and output files respectively. If you do not specify
.IR outfile , .IR outfile ,
.B objcopy .B objcopy
creates a temporary file and destructively renames the result with the creates a temporary file and destructively renames the result with the
name of the input file. name of the input file.
.SH OPTIONS
.TP .TP
.B -I \fIformat\fB, --input-format=\fIformat\fB .B \-I \fIformat
.TP
.B \-\-input\-format=\fIformat
Consider the source file's object format to be Consider the source file's object format to be
.IR format , .IR format ,
rather than attempting to deduce it. rather than attempting to deduce it.
.TP .TP
.B -O \fIformat\fB, --output-format=\fIformat\fB .B \-O \fIformat
.TP
.B \-\-output\-format=\fIformat
Write the output file using the object format Write the output file using the object format
.IR format . .IR format .
.TP .TP
.B -F \fIformat\fB, --format=\fIformat\fB .B \-F \fIformat\fB
.TP
.B \-\-format=\fIformat
Use Use
.I format .I format
as the object format for both the input and the output file; i.e. as the object format for both the input and the output file; i.e.
simply transfer data from source to destination with no translation. simply transfer data from source to destination with no translation.
.TP .TP
.B -S, --strip-all .B \-S
.TP
.B \-\-strip\-all
Do not copy relocation and symbol information from the source file. Do not copy relocation and symbol information from the source file.
.TP .TP
.B -g, --strip-debug .B \-g
.TP
.B \-\-strip\-debug
Do not copy debugging symbols from the source file. Do not copy debugging symbols from the source file.
.TP .TP
.B -x, --discard-all .B \-x
.TP
.B \-\-discard\-all
Do not copy non-global symbols from the source file. Do not copy non-global symbols from the source file.
.TP .TP
.B -X, --discard-locals .B \-X
.TP
.B \-\-discard\-locals
Do not copy compiler-generated local symbols. (These usually start Do not copy compiler-generated local symbols. (These usually start
with "L" or "."). with "L" or ".").
.TP .TP
.B -v, --verbose .B \-v
Verbose output: list all object files modified. In the case of
archives, "\fBobjcopy -V\fR" lists all members of the archive.
.TP .TP
.B -V, --version .B \-\-verbose
Verbose output: list all object files modified. In the case of
archives, "\fBobjcopy \-V\fR" lists all members of the archive.
.TP
.B \-V
.TP
.B \-\-version
Show the version number of Show the version number of
.BR objcopy . .B objcopy
and exit.
.TP
.B \-\-help
Show a summary of the options to
.B objcopy
and exit.
.SH "SEE ALSO" .SH "SEE ALSO"
.RB "`\|" binutils "\|'" .RB "`\|" binutils "\|'"
entry in entry in

View File

@ -35,6 +35,8 @@ objdump\(em\&display information from object files.
.RB "[\|" \-\-stabs "\|]" .RB "[\|" \-\-stabs "\|]"
.RB "[\|" \-t | \-\-syms "\|]" .RB "[\|" \-t | \-\-syms "\|]"
.RB "[\|" \-x "\|]" .RB "[\|" \-x "\|]"
.RB "[\|" \-\-version "\|]"
.RB "[\|" \-\-help "\|]"
.I objfile\c .I objfile\c
\&.\|.\|. \&.\|.\|.
.ad b .ad b
@ -47,17 +49,17 @@ The options control what particular information to display. This
information is mostly useful to programmers who are working on the information is mostly useful to programmers who are working on the
compilation tools, as opposed to programmers who just want their compilation tools, as opposed to programmers who just want their
program to compile and work. program to compile and work.
.SH OPTIONS .PP
Where long and short forms of an option are shown together, they are
equivalent.
.TP
.IR "objfile" .\|.\|. .IR "objfile" .\|.\|.
The object files to be examined. When you specify archives, are the object files to be examined. When you specify archives,
\c \c
.B objdump\c .B objdump\c
\& shows information on each of the member object files. \& shows information on each of the member object files.
.SH OPTIONS
Where long and short forms of an option are shown together, they are
equivalent.
.TP .TP
.B \-a .B \-a
If any files from \c If any files from \c
@ -76,7 +78,7 @@ the object file format of each archive member.
.TP .TP
.BI "-b " "bfdname"\c .BI "-b " "bfdname"\c
\& \&
You can specify a particular object-code format for your object files as Specify the object-code format for the object files to be
\c \c
.I bfdname\c .I bfdname\c
\&. This may not be necessary; \c \&. This may not be necessary; \c
@ -89,7 +91,7 @@ objdump\ \-b\ oasys\ \-m\ vax\ \-h\ fu.o
.br .br
.sp .sp
Displays summary information from the section headers (`\|\c display summary information from the section headers (`\|\c
.B \-h\c .B \-h\c
\|') of \|') of
`\|\c `\|\c
@ -123,6 +125,12 @@ each file in \c
Header. Display summary information from the section headers of the Header. Display summary information from the section headers of the
object file. object file.
.TP
.B \-\-help
Print a summary of the options to
.B objdump
and exit.
.TP .TP
.B \-i .B \-i
Display a list showing all architectures and object formats available Display a list showing all architectures and object formats available
@ -185,6 +193,12 @@ This is similar to the information provided by the `\|\c
.B nm\c .B nm\c
\|' program. \|' program.
.TP
.B \-\-version
Print the version number of
.B objdump
and exit.
.TP .TP
.B \-x .B \-x
Display all available header information, including the symbol table and Display all available header information, including the symbol table and
@ -195,8 +209,6 @@ relocation entries. Using `\|\c
.B \-a \-f \-h \-r \-t\c .B \-a \-f \-h \-r \-t\c
\|'. \|'.
.PP
.SH "SEE ALSO" .SH "SEE ALSO"
.RB "`\|" binutils "\|'" .RB "`\|" binutils "\|'"
entry in entry in

View File

@ -14,38 +14,42 @@ ranlib\(em\&generate index to archive.
.hy 0 .hy 0
.na .na
.B ranlib \c .B ranlib \c
.RB "[\|" \-v | \-V "\|]"
.I archive\c .I archive\c
\& \&
.ad b .ad b
.hy 1 .hy 1
.SH DESCRIPTION .SH DESCRIPTION
\c .B ranlib
.B ranlib\c generates an index to the contents of an archive, and
\& generates an index to the contents of an archive, and
stores it in the archive. The index lists each symbol defined by a stores it in the archive. The index lists each symbol defined by a
member of an archive that is a relocatable object file. member of an archive that is a relocatable object file.
.PP
You may use `\|\c You may use
.B nm \-s\c .RB ` "nm \-s" '
\|' or `\|\c or
.B nm +print-armap\c .RB ` "nm \-\-print-armap" '
\|' to list this index. to list this index.
.PP
An archive with such an index speeds up linking to the library, and An archive with such an index speeds up linking to the library, and
allows routines in the library to call each other without regard to allows routines in the library to call each other without regard to
their placement in the archive. their placement in the archive.
.PP
The GNU
.B ranlib
program is another form of GNU
.BR ar ;
running
.B ranlib
is completely equivalent to executing
.RB ` "ar \-s" '.
The GNU \c .SH OPTIONS
.B ranlib\c .TP
\& program is another form of GNU \c .B \-v
.B ar\c Print the version number of
\&; running .B ranlib
\c and exit.
.B ranlib\c
\& is completely equivalent to executing `\|\c
.B ar \-s\c
\|'.
.SH "SEE ALSO" .SH "SEE ALSO"
.RB "`\|" binutils "\|'" .RB "`\|" binutils "\|'"

View File

@ -35,17 +35,13 @@ size\(em\&list section sizes and total size.
The GNU \c The GNU \c
.B size\c .B size\c
\& utility lists the section sizes\(em\&and the total \& utility lists the section sizes\(em\&and the total
size\(em\&for each of the object files \c size\(em\&for each of the object files
.I objfile\c .I objfile
\& in its argument list. in its argument list.
By default, one line of output is generated for each object file or each By default, one line of output is generated for each object file or each
module in an archive. module in an archive.
.SH OPTIONS .SH OPTIONS
.TP
.IR "objfile" .\|.\|.
The object files to be examined.
.TP .TP
.B \-A .B \-A
.TP .TP
@ -140,17 +136,12 @@ Display version number information on \c
.B size\c .B size\c
\& itself. \& itself.
.PP
.SH "SEE ALSO" .SH "SEE ALSO"
.RB "`\|" binutils "\|'" .RB "`\|" binutils "\|'"
entry in entry in
.B .BR info ;
info\c .IR The GNU Binary Utilities ,
\&; Roland H. Pesch (October 1991);
.I
The GNU Binary Utilities\c
\&, Roland H. Pesch (October 1991);
.BR ar "(" 1 ")," .BR ar "(" 1 "),"
.BR objdump ( 1 ). .BR objdump ( 1 ).

142
binutils/strings.1 Normal file
View File

@ -0,0 +1,142 @@
.\" Copyright (c) 1993 Free Software Foundation
.\" See section COPYING for conditions for redistribution
.TH nm 1 "25 June 1993" "cygnus support" "GNU Development Tools"
.de BP
.sp
.ti \-.2i
\(**
..
.SH NAME
strings\(em\&print the strings of printable characters in files
.SH SYNOPSIS
.hy 0
.na
.TP
.B strings
.RB "[\|" \-a | \-\c
.RB | \-\-all "\|]"
.RB "[\|" \-f | \-\-print\-file\-name "\|]"
.RB "[\|" \-o "\|]"
.RB "[\|" \-\-help "\|]"
.RB "[\|" \-v | \-\-version "\|]"
.RB "[\|" \-n
.I min\-len\c
.RI | \-min\-len\c
.RB | "\-\-bytes="\c
.I min\-len\c
\&\|]
.RB "[\|" \-t
.I {o,x,d}\c
.RB | "\-\-radix="\c
.I {o,x,d}\c
\&\|]
.I file\c
.ad b
.hy 1
.SH DESCRIPTION
For each
.I file
given, GNU \c
.B strings
prints the printable character sequences that are at least 4
characters long (or the number given with the options below) and are
followed by a NUL or newline character. By default, it only prints
the strings from the initialized data sections of object files; for
other types of files, it prints the strings from the whole file.
.PP
.B strings
is mainly useful for determining the contents of non-text files.
.SH OPTIONS
The long and short forms of options, shown here as alternatives, are
equivalent.
.TP
.B \-a
.TP
.B \-\-all
.TP
.B \-
Do not scan only the initialized data section of object files; scan
the whole files.
.TP
.B \-f
.TP
.B \-\-print\-file\-name
Print the name of the file before each string.
.TP
.B \-\-help
Print a summary of the options to
.B strings
on the standard output and exit.
.TP
.B \-v
.TP
.B \-\-version
Print the version number
of
.B strings
on the standard output and exit.
.TP
.B "\-n \fImin\-len\fP"
.B "\-\fImin\-len\fP"
.TP
.B "\-bytes=\fImin\-len\fP"
Print sequences of characters that are at least
.I min\-len
characters long, instead of the default 4.
.TP
.BR "\-t " {o,x,d}
.TP
.BR "\-\-radix=" {o,x,d}
Print the offset within the file before each string. The single
character argument specifies the radix of the offset\(emoctal,
hexadecimal, or decimal.
.TP
.B \-o
Like
.BR "\-t o" .
.PP
.SH "SEE ALSO"
.RB "`\|" binutils "\|'"
entry in
.B
info\c
\&;
.I
The GNU Binary Utilities\c
\&, Roland H. Pesch (October 1991);
.BR ar ( 1 ),
.BR nm ( 1 ),
.BR objdump ( 1 ),
.BR ranlib ( 1 ).
.SH COPYING
Copyright (c) 1993 Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
.PP
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.
.PP
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be included in
translations approved by the Free Software Foundation instead of in
the original English.

View File

@ -21,51 +21,70 @@ strip\(em\&Discard symbols from object files.
.RB "[\|" \-X | \-\-discard\-locals "\|]" .RB "[\|" \-X | \-\-discard\-locals "\|]"
.RB "[\|" \-v | \-\-verbose "\|]" .RB "[\|" \-v | \-\-verbose "\|]"
.RB "[\|" \-V | \-\-version "\|]" .RB "[\|" \-V | \-\-version "\|]"
.RB "[\|" \-V | \-\-help "\|]"
.I objfile\c .I objfile\c
\&.\|.\|. \&.\|.\|.
.SH DESCRIPTION .SH DESCRIPTION
GNU \c GNU
.B strip\c .B strip
\& discards all symbols from the object files discards all symbols from the object files
\c .IR objfile .
.I objfile\c The list of object files may include archives.
\&. The list of object files may include archives. At least one object file must be given.
\c .P
.B strip\c .B strip
\& will not execute unless at least one object file is listed. modifies the files named in its argument,
\& \c
.B strip\c
\& modifies the files named in its argument,
rather than writing modified copies under different names. rather than writing modified copies under different names.
.SH OPTIONS .SH OPTIONS
.TP .TP
.B "\-F \fIformat\fP \-\-format=\fIformat\fP \-\-target=\fIformat\fP" .B "\-F \fIformat"
.TP
.B "\-\-format=\fIformat"
.TP
.B "\-\-target=\fIformat"
Treat the original \fIobjfile\fP as a file with the object Treat the original \fIobjfile\fP as a file with the object
code format \fIformat\fP, and rewrite it in the same format. code format \fIformat\fP, and rewrite it in the same format.
.TP .TP
.B "\-I \fIformat\fP \-\-input\-format=\fIformat\fP" .B \-\-help
Show a summary of the options to
.B strip
and exit.
.TP
.B "\-I \fIformat
.TP
.B "\-\-input\-format=\fIformat"
Treat the original \fIobjfile\fP as a file with the object Treat the original \fIobjfile\fP as a file with the object
code format \fIformat\fP. code format \fIformat\fP.
.TP .TP
.B "\-O \fIformat\fP \-\-output\-format=\fIformat\fP" .B "\-O \fIformat\fP"
.TP
.B "\-\-output\-format=\fIformat"
Replace \fIobjfile\fP with a file in the output format \fIformat\fP. Replace \fIobjfile\fP with a file in the output format \fIformat\fP.
.TP .TP
.B "\-s \-\-strip\-all" .B \-s
.TP
.B \-\-strip\-all
Remove all symbols. Remove all symbols.
.TP .TP
.B "\-S -g \-\-strip\-debug" .B \-S
.TP
.B -g
.TP
.B \-\-strip\-debug
Remove debugging symbols only. Remove debugging symbols only.
.TP .TP
.B "\-x \-\-discard\-all" .B \-x
.TP
.B \-\-discard\-all
Remove non-global symbols. Remove non-global symbols.
.TP .TP
@ -74,25 +93,26 @@ Remove compiler-generated local symbols.
(These usually start with ``L'' or ``.''.) (These usually start with ``L'' or ``.''.)
.TP .TP
.B "\-v \-\-verbose" .B \-v
.TP
.B \-\-verbose
Verbose output: list all object files modified. In the case of Verbose output: list all object files modified. In the case of
archives, ``strip \-V'' lists all members of the archive. archives,
.B "strip \-V"
lists all members of the archive.
.TP .TP
.B "\-V \-\-version .B \-V
Show the version number for \fBstrip\fP. .TP
.B \-\-version
.PP Show the version number for \fBstrip\fP and exit.
.SH "SEE ALSO" .SH "SEE ALSO"
.RB "`\|" binutils "\|'" .RB "`\|" binutils "\|'"
entry in entry in
.B .BR info ;
info\c .IR "The GNU Binary Utilities ,
\&; Roland H. Pesch (October 1991).
.I
The GNU Binary Utilities\c
\&, Roland H. Pesch (October 1991).
.SH COPYING .SH COPYING
Copyright (c) 1991 Free Software Foundation, Inc. Copyright (c) 1991 Free Software Foundation, Inc.