* 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} ]
[ -S | --strip-all ] [ -g | --strip-debug ]
[ -x | --discard-all ] [ -X | --discard-locals ]
[ -v | --verbose ] [ -V | --version ]
[ -v | --verbose ] [ -V | --version ] [ --help ]
@var{infile} [@var{outfile}]
@end smallexample
@ -619,6 +619,9 @@ Show the version number of @code{objcopy}.
@itemx --verbose
Verbose output: list all object files modified. In the case of
archives, @samp{objcopy -V} lists all members of the archive.
@item --help
Show a summary of the options to @code{objcopy}.
@end table
@iftex
@ -642,7 +645,7 @@ nm [ -a | --debug-syms ] [ -g | --extern-only ]
[ -r | --reverse-sort ] [ -u | --undefined-only ]
[ -t @var{radix} | --radix=@var{radix} ] [ -P | --portability ]
[ --target=@var{bfdname} ] [ -f @var{format} | --format=@var{format} ]
[ -V | --version ] [ @var{objfile}@dots{} ]
[ -V | --version ] [ --help ] [ @var{objfile}@dots{} ]
@end smallexample
GNU @code{nm} lists the symbols from object files @var{objfile}@dots{}.
@ -714,7 +717,7 @@ listed.
@itemx --format=@var{format}
Use the output format @var{format}, which can be @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.
@item -g
@ -722,6 +725,12 @@ either upper or lower case.
@cindex 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
@itemx --no-sort
@cindex sorting symbols
@ -733,12 +742,6 @@ encountered.
Use the POSIX.2 standard output format instead of the default format.
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
@itemx --print-armap
@cindex symbol index, listing
@ -769,7 +772,10 @@ Display only undefined symbols (those external to each object file).
@item -V
@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
@node objdump, ranlib, nm, Top
@ -781,8 +787,8 @@ Show the version number of @code{nm}.
@smallexample
objdump [ -a ] [ -b @var{bfdname} ] [ -d ] [ -f ]
[ -h | --header ] [ -i ] [ -j @var{section} ] [ -l ]
[ -m @var{machine} ] [ -r | --reloc ] [ -s ]
[ --stabs ] [ -t | --syms ] [ -x ]
[ -m @var{machine} ] [ -r | --reloc ] [ -s ] [ --stabs ]
[ -t | --syms ] [ -x ] [ --version ] [ --help ]
@var{objfile}@dots{}
@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
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
equivalent.
@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
@c print_arelt_descr
@cindex archive headers
@ -842,6 +848,9 @@ each of the @var{objfile} files.
Header. Display summary information from the section headers of the
object file.
@item --help
Print a summary of the options to @code{objdump} and exit.
@item -i
@cindex architectures available
@cindex object formats available
@ -895,13 +904,15 @@ output.
Symbol Table. Print the symbol table entries of the file.
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
@cindex all header information, object file
@cindex header information, all
Display all available header information, including the symbol table and
relocation entries. Using @samp{-x} is equivalent to specifying all of
@samp{-a -f -h -r -t}.
@end table
@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
object file or each module in an archive.
The command line options have the following meanings:
@table @code
@item @var{objfile}@dots{}
The object files to be examined.
@var{objfile}@dots{} are the object files to be examined.
The command line options have the following meanings:
@table @code
@item -A
@itemx -B
@itemx --format=@var{compatibility}
@ -1038,7 +1049,7 @@ Display the version number of @code{size}.
@cindex strings, printing
@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}]
[--help] [--version] @var{file}@dots{}
@end smallexample
@ -1064,20 +1075,19 @@ the whole files.
@itemx --print-file-name
Print the name of the file before each string.
@item -h
@itemx --help
@item --help
Print a summary of the program usage on the standard output and exit.
@item -n @var{min-len}
@itemx -@var{min-len}
@item -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.
@item -o
Like @samp{-t o}.
Some other versions of @code{strings} have @samp{-o} act like @samp{-t d} instead.
Since we can not be compatible with both ways, we simply chose one.
Like @samp{-t o}. Some other versions of @code{strings} have @samp{-o}
act like @samp{-t d} instead. Since we can not be compatible with both
ways, we simply chose one.
@item -t @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} ]
[ -s | --strip-all ] [ -S | -g | --strip-debug ]
[ -x | --discard-all ] [ -X | --discard-locals ]
[ -v | --verbose ] [ -V | --version ]
[ -v | --verbose ] [ -V | --version ] [ --help ]
@var{objfile}@dots{}
@end smallexample
GNU @code{strip} discards all symbols from object files
@var{objfile}. The list of object files may include archives.
@code{strip} will not execute unless at least one object file is listed.
At least one object file must be given.
@code{strip} modifies the files named in its argument,
rather than writing modified copies under different names.
@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}
@itemx --input-format=@var{format}
Treat the original @var{objfile} as a file with the object
@ -1126,12 +1144,6 @@ code format @var{format}.
@itemx --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
@itemx --strip-all
Remove all symbols.
@ -1166,10 +1178,16 @@ archives, @samp{strip -v} lists all members of the archive.
@kindex c++filt
@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
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 (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
decodes (@dfn{demangles}) low-level names into user-level names so that
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.
Note that on some systems, both the C and C++ compilers put an
underscore in front of every name. (I.e. the C name @code{foo} gets the
low-level name @code{_foo}.) On such systems, @code{c++filt} removes
any initial underscore of a potential label.
@table @code
@item -_
@item --strip-underscores
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
@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,
@example
c++filt @var{SYMBOL}
c++filt @var{symbol}
@end example
@noindent
may in a future release become
@example
c++filt @var{flag} @var{SYMBOL}
c++filt @var{option} @var{symbol}
@end example
@end quotation

View file

@ -8,30 +8,35 @@
..
.SH NAME
c++filt\(em\&demangles C++ symbols
c++filt\(em\&demangle C++ symbols
.SH SYNOPSIS
.hy 0
.na
.TP
.B c++filt
[
.B -_
]
.RB "[\|" \-_ | \-\-strip-underscores "\|]"
.RB "[\|" "\-s {gnu,lucid,arm} " | " \-\-format={gnu,lucid,arm}" "\|]"
.RB "[\|" \-\-help "\|]"
.RB "[\|" \-\-version "\|]"
.RB "[\|" arg "...\|]"
.SH DESCRIPTION
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 (in some circles this is described as
@dfn{mangling}). The
low-level assembly label (this process is known as
.I mangling\c
). The
.B c++filt
program does the inverse mapping: it decodes (\fIdemangles\fR)
low-level names into user-level names so that the linker can keep
these overloaded functions from clashing.
.PP
Every alphanumeric word (consisting of letters, digits, underscores,
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
name in the output.
.PP
A typical use of
.B c++filt
is to pipe the output of
@ -43,22 +48,48 @@ as a filter:
.RS
.B nm \fIobjfile\fB | c++filt
.RE
.PP
You can also use
.B c++filt
to decipher individual symbols by specifying these symbols on the
command line.
.PP
All results are printed on the standard output.
Note that on some systems, both the C and C++ compilers put an
underscore in front of every name. (I.e. the C name
.SH OPTIONS
.TP
.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
gets the low-level name
.BR _foo .)
To remove the leading underscore, specify the option
.B -_
on the command line.
.BR _foo .
This option removes the leading underscore.
.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"
.RB "`\|" binutils "\|'"

View file

@ -23,9 +23,12 @@ nm\(em\&list symbols from object files.
.RB "[\|" \-p | \-\-no\-sort "\|]"
.RB "[\|" \-r | \-\-reverse\-sort "\|]"
.RB "[\|" \-u | \-\-undefined\-only "\|]"
.RB "[\|" "\-\-target="\c
.I bfdname\c
\&\|]
.RB "[\|" \-\-help "\|]"
.RB "[\|" \-\-version "\|]"
.RB "[\|" "\-t \fIradix" | \-\-radix=\fIradix "\|]"
.RB "[\|" \-P | --portability "\|]"
.RB "[\|" "\-f \fIformat" | \-\-format=\fIformat "\|]"
.RB "[\|" "\-\-target=\fIbfdname" "\|]"
.RB "[\|" \c
.I objfile\c
\&.\|.\|.\|]
@ -34,22 +37,27 @@ nm\(em\&list symbols from object files.
.SH DESCRIPTION
GNU \c
.B nm\c
\& will list the symbols from object files \c
\& lists the symbols from object files \c
.I objfile\c
\&.
\&. If no object files are given as arguments, \c
.B nm\c
\& assumes `\|\c
.B a.out\c
\|'.
.SH OPTIONS
The long and short forms of options, shown here as alternatives, are
equivalent.
.TP
.IR "objfile" .\|.\|.
Object files whose symbols are to be listed. If no object files are
listed as arguments, \c
.B nm\c
\& assumes `\|\c
.B a.out\c
\|'.
.B \-A
.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
.B \-a
@ -57,12 +65,28 @@ listed as arguments, \c
.B \-\-debug\-syms
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
.B \-g
.TP
.B \-\-extern\-only
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
.B \-p
.TP
@ -71,11 +95,11 @@ Don't bother to sort the symbols in any order; just print them in the
order encountered.
.TP
.B \-n
.B \-P
.TP
.B \-\-numeric\-sort
Sort symbols numerically by their addresses, not alphabetically by their
names.
.B \-\-portability
Use the POSIX.2 standard output format instead of the default format.
Equivalent to ``\-f posix''.
.TP
.B \-s
@ -89,14 +113,6 @@ When listing symbols from archive members, include the index: a mapping
\&) of what modules
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
.B \-r
.TP
@ -105,7 +121,14 @@ Reverse the sense of the sort (whether numeric or alphabetic); let the
last come first.
.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.
See
@ -118,7 +141,19 @@ for information on listing available formats.
.B \-\-undefined\-only
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"
.RB "`\|" binutils "\|'"

View file

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

View file

@ -14,7 +14,7 @@ objdump\(em\&display information from object files.
.hy 0
.na
.TP
.B objdump
.B objdump
.RB "[\|" \-a "\|]"
.RB "[\|" "\-b\ "\c
.I bfdname\c
@ -35,6 +35,8 @@ objdump\(em\&display information from object files.
.RB "[\|" \-\-stabs "\|]"
.RB "[\|" \-t | \-\-syms "\|]"
.RB "[\|" \-x "\|]"
.RB "[\|" \-\-version "\|]"
.RB "[\|" \-\-help "\|]"
.I objfile\c
\&.\|.\|.
.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
compilation tools, as opposed to programmers who just want their
program to compile and work.
.SH OPTIONS
Where long and short forms of an option are shown together, they are
equivalent.
.TP
.PP
.IR "objfile" .\|.\|.
The object files to be examined. When you specify archives,
are the object files to be examined. When you specify archives,
\c
.B objdump\c
\& 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
.B \-a
If any files from \c
@ -76,7 +78,7 @@ the object file format of each archive member.
.TP
.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
.I bfdname\c
\&. This may not be necessary; \c
@ -89,7 +91,7 @@ objdump\ \-b\ oasys\ \-m\ vax\ \-h\ fu.o
.br
.sp
Displays summary information from the section headers (`\|\c
display summary information from the section headers (`\|\c
.B \-h\c
\|') of
`\|\c
@ -123,6 +125,12 @@ each file in \c
Header. Display summary information from the section headers of the
object file.
.TP
.B \-\-help
Print a summary of the options to
.B objdump
and exit.
.TP
.B \-i
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
\|' program.
.TP
.B \-\-version
Print the version number of
.B objdump
and exit.
.TP
.B \-x
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
\|'.
.PP
.SH "SEE ALSO"
.RB "`\|" binutils "\|'"
entry in

View file

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

View file

@ -35,17 +35,13 @@ size\(em\&list section sizes and total size.
The GNU \c
.B size\c
\& utility lists the section sizes\(em\&and the total
size\(em\&for each of the object files \c
.I objfile\c
\& in its argument list.
size\(em\&for each of the object files
.I objfile
in its argument list.
By default, one line of output is generated for each object file or each
module in an archive.
.SH OPTIONS
.TP
.IR "objfile" .\|.\|.
The object files to be examined.
.TP
.B \-A
.TP
@ -140,17 +136,12 @@ Display version number information on \c
.B size\c
\& itself.
.PP
.SH "SEE ALSO"
.RB "`\|" binutils "\|'"
entry in
.B
info\c
\&;
.I
The GNU Binary Utilities\c
\&, Roland H. Pesch (October 1991);
.BR info ;
.IR The GNU Binary Utilities ,
Roland H. Pesch (October 1991);
.BR ar "(" 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 "[\|" \-v | \-\-verbose "\|]"
.RB "[\|" \-V | \-\-version "\|]"
.RB "[\|" \-V | \-\-help "\|]"
.I objfile\c
\&.\|.\|.
.SH DESCRIPTION
GNU \c
.B strip\c
\& discards all symbols from the object files
\c
.I objfile\c
\&. The list of object files may include archives.
GNU
.B strip
discards all symbols from the object files
.IR objfile .
The list of object files may include archives.
At least one object file must be given.
\c
.B strip\c
\& will not execute unless at least one object file is listed.
\& \c
.B strip\c
\& modifies the files named in its argument,
.P
.B strip
modifies the files named in its argument,
rather than writing modified copies under different names.
.SH OPTIONS
.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
code format \fIformat\fP, and rewrite it in the same format.
.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
code format \fIformat\fP.
.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.
.TP
.B "\-s \-\-strip\-all"
.B \-s
.TP
.B \-\-strip\-all
Remove all symbols.
.TP
.B "\-S -g \-\-strip\-debug"
.B \-S
.TP
.B -g
.TP
.B \-\-strip\-debug
Remove debugging symbols only.
.TP
.B "\-x \-\-discard\-all"
.B \-x
.TP
.B \-\-discard\-all
Remove non-global symbols.
.TP
@ -74,25 +93,26 @@ Remove compiler-generated local symbols.
(These usually start with ``L'' or ``.''.)
.TP
.B "\-v \-\-verbose"
.B \-v
.TP
.B \-\-verbose
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
.B "\-V \-\-version
Show the version number for \fBstrip\fP.
.PP
.B \-V
.TP
.B \-\-version
Show the version number for \fBstrip\fP and exit.
.SH "SEE ALSO"
.RB "`\|" binutils "\|'"
entry in
.B
info\c
\&;
.I
The GNU Binary Utilities\c
\&, Roland H. Pesch (October 1991).
.BR info ;
.IR "The GNU Binary Utilities ,
Roland H. Pesch (October 1991).
.SH COPYING
Copyright (c) 1991 Free Software Foundation, Inc.