binutils.texi

来自「基于4个mips核的noc设计」· TEXI 代码 · 共 1,746 行 · 第 1/5 页

TEXI
1,746
字号
\input texinfo       @c                    -*- Texinfo -*-@setfilename binutils.info@include config.texi@ifinfo@formatSTART-INFO-DIR-ENTRY* Binutils: (binutils).         The GNU binary utilities.* ar: (binutils)ar.               Create, modify, and extract from archives* nm: (binutils)nm.               List symbols from object files* objcopy: (binutils)objcopy.	  Copy and translate object files* objdump: (binutils)objdump.     Display information from object files* ranlib: (binutils)ranlib.       Generate index to archive contents* readelf: (binutils)readelf.	  Display the contents of ELF format files.* size: (binutils)size.           List section sizes and total size* strings: (binutils)strings.     List printable strings from files* strip: (binutils)strip.         Discard symbols* c++filt: (binutils)c++filt.	  Filter to demangle encoded C++ symbols* cxxfilt: (binutils)c++filt.     MS-DOS name for c++filt* addr2line: (binutils)addr2line. Convert addresses to file and line* nlmconv: (binutils)nlmconv.     Converts object code into an NLM* windres: (binutils)windres.	  Manipulate Windows resources* dlltool: (binutils)dlltool.	  Create files needed to build and use DLLsEND-INFO-DIR-ENTRY@end format@end ifinfo@ifinfoCopyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.      Permission is granted to copy, distribute and/or modify this document      under the terms of the GNU Free Documentation License, Version 1.1      or any later version published by the Free Software Foundation;      with no Invariant Sections, with no Front-Cover Texts, and with no      Back-Cover Texts.  A copy of the license is included in the      section entitled "GNU Free Documentation License".@ignorePermission is granted to process this file through TeX and print theresults, provided the printed document carries a copying permissionnotice identical to this one except for the removal of this paragraph(this paragraph not being relevant to the printed manual).@end ignore@end ifinfo@synindex ky cp@c@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, 98, 99, 2000, 2001 Free Software Foundation, Inc.@c @c This text may be freely distributed under the terms of the GNU@c Free Documentation License.@c@setchapternewpage odd@settitle @sc{gnu} Binary Utilities@titlepage@finalout@title The @sc{gnu} Binary Utilities@subtitle Version @value{VERSION}@sp 1@subtitle May 1993@author Roland H. Pesch@author Jeffrey M. Osier@author Cygnus Support@page@tex{\parskip=0pt \hfill Cygnus Support\par \hfill\TeX{}info \texinfoversion\par }@end tex@vskip 0pt plus 1filllCopyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 1998, 2000, 2001 Free Software Foundation, Inc.      Permission is granted to copy, distribute and/or modify this document      under the terms of the GNU Free Documentation License, Version 1.1      or any later version published by the Free Software Foundation;      with no Invariant Sections, with no Front-Cover Texts, and with no      Back-Cover Texts.  A copy of the license is included in the      section entitled "GNU Free Documentation License".@end titlepage@node Top@top Introduction@cindex versionThis brief manual contains preliminary documentation for the @sc{gnu} binaryutilities (collectively version @value{VERSION}): @iftex@table @code@item arCreate, modify, and extract from archives@item nmList symbols from object files@item objcopyCopy and translate object files@item objdumpDisplay information from object files@item ranlibGenerate index to archive contents@item readelfDisplay the contents of ELF format files.@item sizeList file section sizes and total size@item stringsList printable strings from files@item stripDiscard symbols@item c++filtDemangle encoded C++ symbols (on MS-DOS, this program is named@code{cxxfilt})@item addr2lineConvert addresses into file names and line numbers@item nlmconvConvert object code into a Netware Loadable Module@item windresManipulate Windows resources@item dlltoolCreate the files needed to build and use Dynamic Link Libraries@end table@end iftexThis document is distributed under the terms of the GNU FreeDocumentation License.  A copy of the license is included in thesection entitled "GNU Free Documentation License".@menu* ar::                          Create, modify, and extract from archives* nm::                          List symbols from object files* objcopy::			Copy and translate object files* objdump::                     Display information from object files* ranlib::                      Generate index to archive contents* readelf::			Display the contents of ELF format files.* size::                        List section sizes and total size* strings::                     List printable strings from files* strip::                       Discard symbols* 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* dlltool::			Create files needed to build and use DLLs* Selecting The Target System:: How these utilities determine the target.* Reporting Bugs::              Reporting Bugs* GNU Free Documentation License::  GNU Free Documentation License* Index::                       Index@end menu@node ar@chapter ar@kindex ar@cindex archives@cindex collections of files@smallexamplear [-]@var{p}[@var{mod} [@var{relpos}] [@var{count}]] @var{archive} [@var{member}@dots{}]ar -M [ <mri-script ]@end smallexampleThe @sc{gnu} @code{ar} program creates, modifies, and extracts fromarchives.  An @dfn{archive} is a single file holding a collection ofother files in a structure that makes it possible to retrievethe original individual files (called @dfn{members} of the archive).The original files' contents, mode (permissions), timestamp, owner, andgroup are preserved in the archive, and can be restored onextraction.  @cindex name length@sc{gnu} @code{ar} can maintain archives whose members have names of anylength; however, depending on how @code{ar} is configured on yoursystem, a limit on member-name length may be imposed for compatibilitywith archive formats maintained with other tools.  If it exists, thelimit is often 15 characters (typical of formats related to a.out) or 16characters (typical of formats related to coff).@cindex libraries@code{ar} is considered a binary utility because archives of this sortare most often used as @dfn{libraries} holding commonly neededsubroutines.@cindex symbol index@code{ar} creates an index to the symbols defined in relocatableobject modules in the archive when you specify the modifier @samp{s}.Once created, this index is updated in the archive whenever @code{ar}makes a change to its contents (save for the @samp{q} update operation).An archive with such an index speeds up linking to the library, andallows routines in the library to call each other without regard totheir placement in the archive.You may use @samp{nm -s} or @samp{nm --print-armap} to list this indextable.  If an archive lacks the table, another form of @code{ar} called@code{ranlib} can be used to add just the table.@cindex compatibility, @code{ar}@cindex @code{ar} compatibility@sc{gnu} @code{ar} is designed to be compatible with two differentfacilities.  You can control its activity using command-line options,like the different varieties of @code{ar} on Unix systems; or, if youspecify the single command-line option @samp{-M}, you can control itwith a script supplied via standard input, like the MRI ``librarian''program.@menu* ar cmdline::                  Controlling @code{ar} on the command line* ar scripts::                  Controlling @code{ar} with a script@end menu@page@node ar cmdline@section Controlling @code{ar} on the command line@smallexamplear [-X32_64] [-]@var{p}[@var{mod} [@var{relpos}] [@var{count}]] @var{archive} [@var{member}@dots{}]@end smallexample@cindex Unix compatibility, @code{ar}When you use @code{ar} in the Unix style, @code{ar} insists on at least twoarguments to execute: one keyletter specifying the @emph{operation}(optionally accompanied by other keyletters specifying@emph{modifiers}), and the archive name to act on.Most operations can also accept further @var{member} arguments,specifying particular files to operate on.@sc{gnu} @code{ar} allows you to mix the operation code @var{p} and modifierflags @var{mod} in any order, within the first command-line argument.If you wish, you may begin the first command-line argument with adash.@cindex operations on archiveThe @var{p} keyletter specifies what operation to execute; it may beany of the following, but you must specify only one of them:@table @code@item d@cindex deleting from archive@emph{Delete} modules from the archive.  Specify the names of modules tobe deleted as @var{member}@dots{}; the archive is untouched if youspecify no files to delete.If you specify the @samp{v} modifier, @code{ar} lists each moduleas it is deleted.@item m@cindex moving in archiveUse this operation to @emph{move} members in an archive.The ordering of members in an archive can make a difference in howprograms are linked using the library, if a symbol is defined in morethan one member.  If no modifiers are used with @code{m}, any members you name in the@var{member} arguments are moved to the @emph{end} of the archive;you can use the @samp{a}, @samp{b}, or @samp{i} modifiers to move them to aspecified place instead.@item p@cindex printing from archive@emph{Print} the specified members of the archive, to the standardoutput file.  If the @samp{v} modifier is specified, show the membername before copying its contents to standard output.If you specify no @var{member} arguments, all the files in the archive areprinted.@item q@cindex quick append to archive@emph{Quick append}; Historically, add the files @var{member}@dots{} to the end of@var{archive}, without checking for replacement.The modifiers @samp{a}, @samp{b}, and @samp{i} do @emph{not} affect thisoperation; new members are always placed at the end of the archive.The modifier @samp{v} makes @code{ar} list each file as it is appended.Since the point of this operation is speed, the archive's symbol tableindex is not updated, even if it already existed; you can use @samp{ar s} or@code{ranlib} explicitly to update the symbol table index.However, too many different systems assume quick append rebuilds theindex, so GNU ar implements @code{q} as a synonym for @code{r}.@item r@cindex replacement in archiveInsert the files @var{member}@dots{} into @var{archive} (with@emph{replacement}). This operation differs from @samp{q} in that anypreviously existing members are deleted if their names match those beingadded.If one of the files named in @var{member}@dots{} does not exist, @code{ar}displays an error message, and leaves undisturbed any existing membersof the archive matching that name.By default, new members are added at the end of the file; but you mayuse one of the modifiers @samp{a}, @samp{b}, or @samp{i} to requestplacement relative to some existing member.The modifier @samp{v} used with this operation elicits a line ofoutput for each file inserted, along with one of the letters @samp{a} or@samp{r} to indicate whether the file was appended (no old memberdeleted) or replaced.@item t@cindex contents of archiveDisplay a @emph{table} listing the contents of @var{archive}, or thoseof the files listed in @var{member}@dots{} that are present in thearchive.  Normally only the member name is shown; if you also want tosee the modes (permissions), timestamp, owner, group, and size, you canrequest that by also specifying the @samp{v} modifier.If you do not specify a @var{member}, all files in the archiveare listed.@cindex repeated names in archive@cindex name duplication in archiveIf there is more than one file with the same name (say, @samp{fie}) inan archive (say @samp{b.a}), @samp{ar t b.a fie} lists only thefirst instance; to see them all, you must ask for a completelisting---in our example, @samp{ar t b.a}.@c WRS only; per Gumby, this is implementation-dependent, and in a more@c recent case in fact works the other way.@item x@cindex extract from archive@emph{Extract} members (named @var{member}) from the archive.  You canuse the @samp{v} modifier with this operation, to request that@code{ar} list each name as it extracts it.If you do not specify a @var{member}, all files in the archive

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?