binutils.texi
来自「基于4个mips核的noc设计」· TEXI 代码 · 共 1,746 行 · 第 1/5 页
TEXI
1,746 行
are extracted.@end tableA number of modifiers (@var{mod}) may immediately follow the @var{p}keyletter, to specify variations on an operation's behavior:@table @code@item a@cindex relative placement in archiveAdd new files @emph{after} an existing member of thearchive. If you use the modifier @samp{a}, the name of an existing archivemember must be present as the @var{relpos} argument, before the@var{archive} specification.@item bAdd new files @emph{before} an existing member of thearchive. If you use the modifier @samp{b}, the name of an existing archivemember must be present as the @var{relpos} argument, before the@var{archive} specification. (same as @samp{i}).@item c@cindex creating archives@emph{Create} the archive. The specified @var{archive} is alwayscreated if it did not exist, when you request an update. But a warning isissued unless you specify in advance that you expect to create it, byusing this modifier.@item fTruncate names in the archive. @sc{gnu} @code{ar} will normally permit filenames of any length. This will cause it to create archives which arenot compatible with the native @code{ar} program on some systems. Ifthis is a concern, the @samp{f} modifier may be used to truncate filenames when putting them in the archive.@item iInsert new files @emph{before} an existing member of thearchive. If you use the modifier @samp{i}, the name of an existing archivemember must be present as the @var{relpos} argument, before the@var{archive} specification. (same as @samp{b}).@item lThis modifier is accepted but not used.@c whaffor ar l modifier??? presumably compat; with@c what???---doc@@cygnus.com, 25jan91 @item NUses the @var{count} parameter. This is used if there are multipleentries in the archive with the same name. Extract or delete instance@var{count} of the given name from the archive.@item o@cindex dates in archivePreserve the @emph{original} dates of members when extracting them. Ifyou do not specify this modifier, files extracted from the archiveare stamped with the time of extraction.@item PUse the full path name when matching names in the archive. @sc{gnu}@code{ar} can not create an archive with a full path name (such archivesare not POSIX complaint), but other archive creators can. This optionwill cause @sc{gnu} @code{ar} to match file names using a complete pathname, which can be convenient when extracting a single file from anarchive created by another tool.@item s@cindex writing archive indexWrite an object-file index into the archive, or update an existing one,even if no other change is made to the archive. You may use this modifierflag either with any operation, or alone. Running @samp{ar s} on anarchive is equivalent to running @samp{ranlib} on it.@item S@cindex not writing archive indexDo not generate an archive symbol table. This can speed up building alarge library in several steps. The resulting archive can not be usedwith 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 archiveNormally, @samp{ar r}@dots{} inserts all fileslisted into the archive. If you would like to insert @emph{only} thoseof the files you list that are newer than existing members of the samenames, use this modifier. The @samp{u} modifier is allowed only for theoperation @samp{r} (replace). In particular, the combination @samp{qu} isnot allowed, since checking the timestamps would lose any speedadvantage from the operation @samp{q}.@item vThis modifier requests the @emph{verbose} version of an operation. Manyoperations display additional information, such as filenames processed,when the modifier @samp{v} is appended.@item VThis modifier shows the version number of @code{ar}.@end table@code{ar} ignores an initial option spelt @code{-X32_64}, forcompatibility with AIX. The behaviour produced by this option is thedefault for GNU @code{ar}. @code{ar} does not support any of the other@code{-X} options; in particular, it does not support @code{-X32}which is the default for AIX @code{ar}.@node ar scripts@section Controlling @code{ar} with a script@smallexamplear -M [ <@var{script} ]@end smallexample@cindex MRI compatibility, @code{ar}@cindex scripts, @code{ar}If you use the single command-line option @samp{-M} with @code{ar}, youcan control its operation with a rudimentary command language. Thisform of @code{ar} operates interactively if standard input is comingdirectly from a terminal. During interactive use, @code{ar} prompts forinput (the prompt is @samp{AR >}), and continues executing even aftererrors. If you redirect standard input to a script file, no prompts areissued, and @code{ar} abandons execution (with a nonzero exit code)on any error.The @code{ar} command language is @emph{not} designed to be equivalentto the command-line options; in fact, it provides somewhat less controlover archives. The only purpose of the command language is to ease thetransition to @sc{gnu} @code{ar} for developers who already have scriptswritten for the MRI ``librarian'' program.The syntax for the @code{ar} command language is straightforward:@itemize @bullet@itemcommands are recognized in upper or lower case; for example, @code{LIST}is the same as @code{list}. In the following descriptions, commands areshown in upper case for clarity.@itema single command may appear on each line; it is the first word on theline.@itemempty lines are allowed, and have no effect.@itemcomments are allowed; text after either of the characters @samp{*}or @samp{;} is ignored.@itemWhenever you use a list of names as part of the argument to an @code{ar}command, you can separate the individual names with either commas orblanks. Commas are shown in the explanations below, for clarity.@item@samp{+} is used as a line continuation character; if @samp{+} appearsat the end of a line, the text on the following line is considered partof the current command.@end itemizeHere are the commands you can use in @code{ar} scripts, or when using@code{ar} interactively. Three of them have special significance:@code{OPEN} or @code{CREATE} specify a @dfn{current archive}, which isa temporary file required for most of the other commands.@code{SAVE} commits the changes so far specified by the script. Priorto @code{SAVE}, commands affect only the temporary copy of the currentarchive.@table @code@item ADDLIB @var{archive} @itemx ADDLIB @var{archive} (@var{module}, @var{module}, @dots{} @var{module})Add all the contents of @var{archive} (or, if specified, each named@var{module} from @var{archive}) to the current archive.Requires prior use of @code{OPEN} or @code{CREATE}.@item ADDMOD @var{member}, @var{member}, @dots{} @var{member}@c FIXME! w/Replacement?? If so, like "ar r @var{archive} @var{names}"@c else like "ar q..."Add each named @var{member} as a module in the current archive.Requires prior use of @code{OPEN} or @code{CREATE}.@item CLEARDiscard the contents of the current archive, canceling the effect ofany operations since the last @code{SAVE}. May be executed (with noeffect) even if no current archive is specified.@item CREATE @var{archive}Creates an archive, and makes it the current archive (required for manyother commands). The new archive is created with a temporary name; itis not actually saved as @var{archive} until you use @code{SAVE}.You can overwrite existing archives; similarly, the contents of anyexisting file named @var{archive} will not be destroyed until @code{SAVE}.@item DELETE @var{module}, @var{module}, @dots{} @var{module}Delete each listed @var{module} from the current archive; equivalent to@samp{ar -d @var{archive} @var{module} @dots{} @var{module}}.Requires prior use of @code{OPEN} or @code{CREATE}.@item DIRECTORY @var{archive} (@var{module}, @dots{} @var{module})@itemx DIRECTORY @var{archive} (@var{module}, @dots{} @var{module}) @var{outputfile}List each named @var{module} present in @var{archive}. The separatecommand @code{VERBOSE} specifies the form of the output: when verboseoutput is off, output is like that of @samp{ar -t @var{archive}@var{module}@dots{}}. When verbose output is on, the listing is like@samp{ar -tv @var{archive} @var{module}@dots{}}.Output normally goes to the standard output stream; however, if youspecify @var{outputfile} as a final argument, @code{ar} directs theoutput to that file.@item ENDExit from @code{ar}, with a @code{0} exit code to indicate successfulcompletion. This command does not save the output file; if you havechanged the current archive since the last @code{SAVE} command, thosechanges are lost.@item EXTRACT @var{module}, @var{module}, @dots{} @var{module}Extract each named @var{module} from the current archive, writing theminto the current directory as separate files. Equivalent to @samp{ar -x@var{archive} @var{module}@dots{}}.Requires prior use of @code{OPEN} or @code{CREATE}.@ignore@c FIXME Tokens but no commands???@item FULLDIR@item HELP@end ignore@item LISTDisplay full contents of the current archive, in ``verbose'' styleregardless of the state of @code{VERBOSE}. The effect is like @samp{artv @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}.@item OPEN @var{archive}Opens an existing archive for use as the current archive (required formany other commands). Any changes as the result of subsequent commandswill not actually affect @var{archive} until you next use @code{SAVE}.@item REPLACE @var{module}, @var{module}, @dots{} @var{module}In the current archive, replace each existing @var{module} (named inthe @code{REPLACE} arguments) from files in the current working directory.To execute this command without errors, both the file, and the module inthe current archive, must exist. Requires prior use of @code{OPEN} or @code{CREATE}.@item VERBOSEToggle an internal flag governing the output from @code{DIRECTORY}.When the flag is on, @code{DIRECTORY} output matches output from@samp{ar -tv }@dots{}.@item SAVECommit your changes to the current archive, and actually save it as afile with the name specified in the last @code{CREATE} or @code{OPEN}command. Requires prior use of @code{OPEN} or @code{CREATE}.@end table@iftex@node ld@chapter ld@cindex linker@kindex ldThe @sc{gnu} linker @code{ld} is now described in a separate manual.@xref{Top,, Overview,, Using LD: the @sc{gnu} linker}.@end iftex@node nm@chapter nm@cindex symbols@kindex nm@smallexamplenm [ -a | --debug-syms ] [ -g | --extern-only ] [ -B ] [ -C | --demangle[=@var{style}] ] [ -D | --dynamic ] [ -s | --print-armap ] [ -A | -o | --print-file-name ] [ -n | -v | --numeric-sort ] [ -p | --no-sort ] [ -r | --reverse-sort ] [ --size-sort ] [ -u | --undefined-only ] [ -t @var{radix} | --radix=@var{radix} ] [ -P | --portability ] [ --target=@var{bfdname} ] [ -f @var{format} | --format=@var{format} ] [ --defined-only ] [-l | --line-numbers ] [ --no-demangle ] [ -V | --version ] [ -X 32_64 ] [ --help ] [ @var{objfile}@dots{} ]@end smallexample@sc{gnu} @code{nm} lists the symbols from object files @var{objfile}@dots{}.If no object files are listed as arguments, @code{nm} assumes the file@file{a.out}.For each symbol, @code{nm} shows:@itemize @bullet@itemThe symbol value, in the radix selected by options (see below), orhexadecimal by default.@itemThe symbol type. At least the following types are used; others are, aswell, depending on the object file format. If lowercase, the symbol islocal; if uppercase, the symbol is global (external).@c Some more detail on exactly what these symbol types are used for@c would be nice.@table @code@item AThe symbol's value is absolute, and will not be changed by furtherlinking.@item BThe symbol is in the uninitialized data section (known as BSS).@item CThe symbol is common. Common symbols are uninitialized data. Whenlinking, multiple common symbols may appear with the same name. If thesymbol is defined anywhere, the common symbols are treated as undefinedreferences. For more details on common symbols, see the discussion of--warn-common in @ref{Options,,Linker options,ld.info,The GNU linker}.@item DThe symbol is in the initialized data section.@item GThe symbol is in an initialized data section for small objects. Someobject file formats permit more efficient access to small data objects,such as a global int variable as opposed to a large global array.@item IThe symbol is an indirect reference to another symbol. This is a GNUextension to the a.out object file format which is rarely used.@item NThe symbol is a debugging symbol.@item RThe symbol is in a read only data section.@item SThe symbol is in an uninitialized data section for small objects.@item TThe symbol is in the text (code) section.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?