1.Dd 2015-03-02 2.Dt BINUTILS 7 3.Os 4.Sh NAME 5.Nm binutils 6.Nd GNU Binary Utilities 7.Sh Introduction 8This brief manual contains documentation for the GNU binary utilities version "2.17.50 9[FreeBSD] 2007-07-03": 10.Pp 11This document is distributed under the terms of the GNU Free Documentation 12License. A copy of the license is included in the section entitled "GNU Free 13Documentation License". 14.Pp 15.Sh ar 16.Bd -literal -offset indent 17ar [-]p[mod [relpos] [count]] archive [member...] 18ar -M [ <mri-script ] 19.Ed 20.Pp 21The GNU 22.Xr ar 23program creates, modifies, and extracts from archives. An 24.Em archive 25is a single file holding a collection of other files in a structure that makes 26it possible to retrieve the original individual files (called 27.Em members 28of the archive). 29.Pp 30The original files' contents, mode (permissions), timestamp, owner, and group 31are preserved in the archive, and can be restored on extraction. 32.Pp 33GNU 34.Xr ar 35can maintain archives whose members have names of any length; however, depending 36on how 37.Xr ar 38is configured on your system, a limit on member-name length may be imposed 39for compatibility with archive formats maintained with other tools. If it 40exists, the limit is often 15 characters (typical of formats related to a.out) 41or 16 characters (typical of formats related to coff). 42.Pp 43.Xr ar 44is considered a binary utility because archives of this sort are most often 45used as 46.Em libraries 47holding commonly needed subroutines. 48.Pp 49.Xr ar 50creates an index to the symbols defined in relocatable object modules in the 51archive when you specify the modifier 52.Li s . 53Once created, this index is updated in the archive whenever 54.Xr ar 55makes a change to its contents (save for the 56.Li q 57update operation). An archive with such an index speeds up linking to the 58library, and allows routines in the library to call each other without regard 59to their placement in the archive. 60.Pp 61You may use 62.Li nm -s 63or 64.Li nm --print-armap 65to list this index table. If an archive lacks the table, another form of 66.Xr ar 67called 68.Xr ranlib 69can be used to add just the table. 70.Pp 71GNU 72.Xr ar 73is designed to be compatible with two different facilities. You can control 74its activity using command-line options, like the different varieties of 75.Xr ar 76on Unix systems; or, if you specify the single command-line option 77.Op -M , 78you can control it with a script supplied via standard input, like the MRI 79\(lqlibrarian\(rq program. 80.Pp 81.Ss Controlling Xr ar on the Command Line 82.Bd -literal -offset indent 83ar [-X32_64] [-]p[mod [relpos] [count]] archive [member...] 84.Ed 85.Pp 86When you use 87.Xr ar 88in the Unix style, 89.Xr ar 90insists on at least two arguments to execute: one keyletter specifying the 91.Em operation 92(optionally accompanied by other keyletters specifying 93.Em modifiers ) , 94and the archive name to act on. 95.Pp 96Most operations can also accept further 97.Va member 98arguments, specifying particular files to operate on. 99.Pp 100GNU 101.Xr ar 102allows you to mix the operation code 103.Va p 104and modifier flags 105.Va mod 106in any order, within the first command-line argument. 107.Pp 108If you wish, you may begin the first command-line argument with a dash. 109.Pp 110The 111.Va p 112keyletter specifies what operation to execute; it may be any of the following, 113but you must specify only one of them: 114.Pp 115.Bl -tag -width Ds 116.It d 117.Em Delete 118modules from the archive. Specify the names of modules to be deleted as 119.Va member 120\&...; the archive is untouched if you specify no files to delete. 121.Pp 122If you specify the 123.Li v 124modifier, 125.Xr ar 126lists each module as it is deleted. 127.Pp 128.It m 129Use this operation to 130.Em move 131members in an archive. 132.Pp 133The ordering of members in an archive can make a difference in how programs 134are linked using the library, if a symbol is defined in more than one member. 135.Pp 136If no modifiers are used with 137.Li m , 138any members you name in the 139.Va member 140arguments are moved to the 141.Em end 142of the archive; you can use the 143.Li a , 144.Li b , 145or 146.Li i 147modifiers to move them to a specified place instead. 148.Pp 149.It p 150.Em Print 151the specified members of the archive, to the standard output file. If the 152.Li v 153modifier is specified, show the member name before copying its contents to 154standard output. 155.Pp 156If you specify no 157.Va member 158arguments, all the files in the archive are printed. 159.Pp 160.It q 161.Em Quick append ; 162Historically, add the files 163.Va member 164\&...to the end of 165.Va archive , 166without checking for replacement. 167.Pp 168The modifiers 169.Li a , 170.Li b , 171and 172.Li i 173do 174.Em not 175affect this operation; new members are always placed at the end of the archive. 176.Pp 177The modifier 178.Li v 179makes 180.Xr ar 181list each file as it is appended. 182.Pp 183Since the point of this operation is speed, the archive's symbol table index 184is not updated, even if it already existed; you can use 185.Li ar s 186or 187.Xr ranlib 188explicitly to update the symbol table index. 189.Pp 190However, too many different systems assume quick append rebuilds the index, 191so GNU 192.Xr ar 193implements 194.Li q 195as a synonym for 196.Li r . 197.Pp 198.It r 199Insert the files 200.Va member 201\&...into 202.Va archive 203(with 204.Em replacement ) . 205This operation differs from 206.Li q 207in that any previously existing members are deleted if their names match those 208being added. 209.Pp 210If one of the files named in 211.Va member 212\&...does not exist, 213.Xr ar 214displays an error message, and leaves undisturbed any existing members of 215the archive matching that name. 216.Pp 217By default, new members are added at the end of the file; but you may use 218one of the modifiers 219.Li a , 220.Li b , 221or 222.Li i 223to request placement relative to some existing member. 224.Pp 225The modifier 226.Li v 227used with this operation elicits a line of output for each file inserted, 228along with one of the letters 229.Li a 230or 231.Li r 232to indicate whether the file was appended (no old member deleted) or replaced. 233.Pp 234.It t 235Display a 236.Em table 237listing the contents of 238.Va archive , 239or those of the files listed in 240.Va member 241\&...that are present in the archive. Normally only the member name is shown; if 242you also want to see the modes (permissions), timestamp, owner, group, and 243size, you can request that by also specifying the 244.Li v 245modifier. 246.Pp 247If you do not specify a 248.Va member , 249all files in the archive are listed. 250.Pp 251If there is more than one file with the same name (say, 252.Li fie ) 253in an archive (say 254.Li b.a ) , 255.Li ar t b.a fie 256lists only the first instance; to see them all, you must ask for a complete 257listing---in our example, 258.Li ar t b.a . 259.Pp 260.It x 261.Em Extract 262members (named 263.Va member ) 264from the archive. You can use the 265.Li v 266modifier with this operation, to request that 267.Xr ar 268list each name as it extracts it. 269.Pp 270If you do not specify a 271.Va member , 272all files in the archive are extracted. 273.Pp 274.El 275A number of modifiers ( 276.Va mod ) 277may immediately follow the 278.Va p 279keyletter, to specify variations on an operation's behavior: 280.Pp 281.Bl -tag -width Ds 282.It a 283Add new files 284.Em after 285an existing member of the archive. If you use the modifier 286.Li a , 287the name of an existing archive member must be present as the 288.Va relpos 289argument, before the 290.Va archive 291specification. 292.Pp 293.It b 294Add new files 295.Em before 296an existing member of the archive. If you use the modifier 297.Li b , 298the name of an existing archive member must be present as the 299.Va relpos 300argument, before the 301.Va archive 302specification. (same as 303.Li i ) . 304.Pp 305.It c 306.Em Create 307the archive. The specified 308.Va archive 309is always created if it did not exist, when you request an update. But a warning 310is issued unless you specify in advance that you expect to create it, by using 311this modifier. 312.Pp 313.It f 314Truncate names in the archive. GNU 315.Xr ar 316will normally permit file names of any length. This will cause it to create 317archives which are not compatible with the native 318.Xr ar 319program on some systems. If this is a concern, the 320.Li f 321modifier may be used to truncate file names when putting them in the archive. 322.Pp 323.It i 324Insert new files 325.Em before 326an existing member of the archive. If you use the modifier 327.Li i , 328the name of an existing archive member must be present as the 329.Va relpos 330argument, before the 331.Va archive 332specification. (same as 333.Li b ) . 334.Pp 335.It l 336This modifier is accepted but not used. 337.Pp 338.It N 339Uses the 340.Va count 341parameter. This is used if there are multiple entries in the archive with 342the same name. Extract or delete instance 343.Va count 344of the given name from the archive. 345.Pp 346.It o 347Preserve the 348.Em original 349dates of members when extracting them. If you do not specify this modifier, 350files extracted from the archive are stamped with the time of extraction. 351.Pp 352.It P 353Use the full path name when matching names in the archive. GNU 354.Xr ar 355can not create an archive with a full path name (such archives are not POSIX 356complaint), but other archive creators can. This option will cause GNU 357.Xr ar 358to match file names using a complete path name, which can be convenient when 359extracting a single file from an archive created by another tool. 360.Pp 361.It s 362Write an object-file index into the archive, or update an existing one, even 363if no other change is made to the archive. You may use this modifier flag 364either with any operation, or alone. Running 365.Li ar s 366on an archive is equivalent to running 367.Li ranlib 368on it. 369.Pp 370.It S 371Do not generate an archive symbol table. This can speed up building a large 372library in several steps. The resulting archive can not be used with the linker. 373In order to build a symbol table, you must omit the 374.Li S 375modifier on the last execution of 376.Li ar , 377or you must run 378.Li ranlib 379on the archive. 380.Pp 381.It u 382Normally, 383.Li ar r 384\&...inserts all files listed into the archive. If you would like to insert 385.Em only 386those of the files you list that are newer than existing members of the same 387names, use this modifier. The 388.Li u 389modifier is allowed only for the operation 390.Li r 391(replace). In particular, the combination 392.Li qu 393is not allowed, since checking the timestamps would lose any speed advantage 394from the operation 395.Li q . 396.Pp 397.It v 398This modifier requests the 399.Em verbose 400version of an operation. Many operations display additional information, such 401as filenames processed, when the modifier 402.Li v 403is appended. 404.Pp 405.It V 406This modifier shows the version number of 407.Xr ar . 408.El 409.Pp 410.Xr ar 411ignores an initial option spelt 412.Li -X32_64 , 413for compatibility with AIX. The behaviour produced by this option is the default 414for GNU 415.Xr ar . 416.Xr ar 417does not support any of the other 418.Li -X 419options; in particular, it does not support 420.Op -X32 421which is the default for AIX 422.Xr ar . 423.Pp 424.Ss Controlling Xr ar with a Script 425.Bd -literal -offset indent 426ar -M [ <script ] 427.Ed 428.Pp 429If you use the single command-line option 430.Li -M 431with 432.Xr ar , 433you can control its operation with a rudimentary command language. This form 434of 435.Xr ar 436operates interactively if standard input is coming directly from a terminal. 437During interactive use, 438.Xr ar 439prompts for input (the prompt is 440.Li AR > ) , 441and continues executing even after errors. If you redirect standard input 442to a script file, no prompts are issued, and 443.Xr ar 444abandons execution (with a nonzero exit code) on any error. 445.Pp 446The 447.Xr ar 448command language is 449.Em not 450designed to be equivalent to the command-line options; in fact, it provides 451somewhat less control over archives. The only purpose of the command language 452is to ease the transition to GNU 453.Xr ar 454for developers who already have scripts written for the MRI \(lqlibrarian\(rq program. 455.Pp 456The syntax for the 457.Xr ar 458command language is straightforward: 459.Bl -bullet 460.It 461commands are recognized in upper or lower case; for example, 462.Li LIST 463is the same as 464.Li list . 465In the following descriptions, commands are shown in upper case for clarity. 466.Pp 467.It 468a single command may appear on each line; it is the first word on the line. 469.Pp 470.It 471empty lines are allowed, and have no effect. 472.Pp 473.It 474comments are allowed; text after either of the characters 475.Li * 476or 477.Li ; 478is ignored. 479.Pp 480.It 481Whenever you use a list of names as part of the argument to an 482.Xr ar 483command, you can separate the individual names with either commas or blanks. 484Commas are shown in the explanations below, for clarity. 485.Pp 486.It 487.Li + 488is used as a line continuation character; if 489.Li + 490appears at the end of a line, the text on the following line is considered 491part of the current command. 492.El 493.Pp 494Here are the commands you can use in 495.Xr ar 496scripts, or when using 497.Xr ar 498interactively. Three of them have special significance: 499.Pp 500.Li OPEN 501or 502.Li CREATE 503specify a 504.Em current archive , 505which is a temporary file required for most of the other commands. 506.Pp 507.Li SAVE 508commits the changes so far specified by the script. Prior to 509.Li SAVE , 510commands affect only the temporary copy of the current archive. 511.Pp 512.Bl -tag -width Ds 513.It ADDLIB Va archive 514.It ADDLIB Va archive ( Va module, Va module, ... Va module) 515Add all the contents of 516.Va archive 517(or, if specified, each named 518.Va module 519from 520.Va archive ) 521to the current archive. 522.Pp 523Requires prior use of 524.Li OPEN 525or 526.Li CREATE . 527.Pp 528.It ADDMOD Va member, Va member, ... Va member 529Add each named 530.Va member 531as a module in the current archive. 532.Pp 533Requires prior use of 534.Li OPEN 535or 536.Li CREATE . 537.Pp 538.It CLEAR 539Discard the contents of the current archive, canceling the effect of any operations 540since the last 541.Li SAVE . 542May be executed (with no effect) even if no current archive is specified. 543.Pp 544.It CREATE Va archive 545Creates an archive, and makes it the current archive (required for many other 546commands). The new archive is created with a temporary name; it is not actually 547saved as 548.Va archive 549until you use 550.Li SAVE . 551You can overwrite existing archives; similarly, the contents of any existing 552file named 553.Va archive 554will not be destroyed until 555.Li SAVE . 556.Pp 557.It DELETE Va module, Va module, ... Va module 558Delete each listed 559.Va module 560from the current archive; equivalent to 561.Li ar -d Va archive Va module ... Va module . 562.Pp 563Requires prior use of 564.Li OPEN 565or 566.Li CREATE . 567.Pp 568.It DIRECTORY Va archive ( Va module, ... Va module) 569.It DIRECTORY Va archive ( Va module, ... Va module) Va outputfile 570List each named 571.Va module 572present in 573.Va archive . 574The separate command 575.Li VERBOSE 576specifies the form of the output: when verbose output is off, output is like 577that of 578.Li ar -t Va archive Va module... . 579When verbose output is on, the listing is like 580.Li ar -tv Va archive Va module... . 581.Pp 582Output normally goes to the standard output stream; however, if you specify 583.Va outputfile 584as a final argument, 585.Xr ar 586directs the output to that file. 587.Pp 588.It END 589Exit from 590.Xr ar , 591with a 592.Li 0 593exit code to indicate successful completion. This command does not save the 594output file; if you have changed the current archive since the last 595.Li SAVE 596command, those changes are lost. 597.Pp 598.It EXTRACT Va module, Va module, ... Va module 599Extract each named 600.Va module 601from the current archive, writing them into the current directory as separate 602files. Equivalent to 603.Li ar -x Va archive Va module... . 604.Pp 605Requires prior use of 606.Li OPEN 607or 608.Li CREATE . 609.Pp 610.It LIST 611Display full contents of the current archive, in \(lqverbose\(rq style regardless 612of the state of 613.Li VERBOSE . 614The effect is like 615.Li ar tv Va archive . 616(This single command is a GNU 617.Xr ar 618enhancement, rather than present for MRI compatibility.) 619.Pp 620Requires prior use of 621.Li OPEN 622or 623.Li CREATE . 624.Pp 625.It OPEN Va archive 626Opens an existing archive for use as the current archive (required for many 627other commands). Any changes as the result of subsequent commands will not 628actually affect 629.Va archive 630until you next use 631.Li SAVE . 632.Pp 633.It REPLACE Va module, Va module, ... Va module 634In the current archive, replace each existing 635.Va module 636(named in the 637.Li REPLACE 638arguments) from files in the current working directory. To execute this command 639without errors, both the file, and the module in the current archive, must 640exist. 641.Pp 642Requires prior use of 643.Li OPEN 644or 645.Li CREATE . 646.Pp 647.It VERBOSE 648Toggle an internal flag governing the output from 649.Li DIRECTORY . 650When the flag is on, 651.Li DIRECTORY 652output matches output from 653.Li ar -tv 654\&...\&. 655.Pp 656.It SAVE 657Commit your changes to the current archive, and actually save it as a file 658with the name specified in the last 659.Li CREATE 660or 661.Li OPEN 662command. 663.Pp 664Requires prior use of 665.Li OPEN 666or 667.Li CREATE . 668.Pp 669.El 670.Sh nm 671.Bd -literal -offset indent 672nm [-a|--debug-syms] [-g|--extern-only] 673 [-B] [-C|--demangle[=style]] [-D|--dynamic] 674 [-S|--print-size] [-s|--print-armap] 675 [-A|-o|--print-file-name][--special-syms] 676 [-n|-v|--numeric-sort] [-p|--no-sort] 677 [-r|--reverse-sort] [--size-sort] [-u|--undefined-only] 678 [-t radix|--radix=radix] [-P|--portability] 679 [--target=bfdname] [-fformat|--format=format] 680 [--defined-only] [-l|--line-numbers] [--no-demangle] 681 [-V|--version] [-X 32_64] [--help] [objfile...] 682.Ed 683.Pp 684GNU 685.Xr nm 686lists the symbols from object files 687.Va objfile 688\&...\&. If no object files are listed as arguments, 689.Xr nm 690assumes the file 691.Pa a.out . 692.Pp 693For each symbol, 694.Xr nm 695shows: 696.Pp 697.Bl -bullet 698.It 699The symbol value, in the radix selected by options (see below), or hexadecimal 700by default. 701.Pp 702.It 703The symbol type. At least the following types are used; others are, as well, 704depending on the object file format. If lowercase, the symbol is local; if 705uppercase, the symbol is global (external). 706.Pp 707.Bl -tag -width Ds 708.It A 709The symbol's value is absolute, and will not be changed by further linking. 710.Pp 711.It B 712The symbol is in the uninitialized data section (known as BSS). 713.Pp 714.It C 715The symbol is common. Common symbols are uninitialized data. When linking, 716multiple common symbols may appear with the same name. If the symbol is defined 717anywhere, the common symbols are treated as undefined references. For more 718details on common symbols, see the discussion of --warn-common in Options,,Linker 719options,ld.info,The GNU linker. 720.Pp 721.It D 722The symbol is in the initialized data section. 723.Pp 724.It G 725The symbol is in an initialized data section for small objects. Some object 726file formats permit more efficient access to small data objects, such as a 727global int variable as opposed to a large global array. 728.Pp 729.It I 730The symbol is an indirect reference to another symbol. This is a GNU extension 731to the a.out object file format which is rarely used. 732.Pp 733.It N 734The symbol is a debugging symbol. 735.Pp 736.It R 737The symbol is in a read only data section. 738.Pp 739.It S 740The symbol is in an uninitialized data section for small objects. 741.Pp 742.It T 743The symbol is in the text (code) section. 744.Pp 745.It U 746The symbol is undefined. 747.Pp 748.It V 749The symbol is a weak object. When a weak defined symbol is linked with a normal 750defined symbol, the normal defined symbol is used with no error. When a weak 751undefined symbol is linked and the symbol is not defined, the value of the 752weak symbol becomes zero with no error. 753.Pp 754.It W 755The symbol is a weak symbol that has not been specifically tagged as a weak 756object symbol. When a weak defined symbol is linked with a normal defined 757symbol, the normal defined symbol is used with no error. When a weak undefined 758symbol is linked and the symbol is not defined, the value of the symbol is 759determined in a system-specific manner without error. On some systems, uppercase 760indicates that a default value has been specified. 761.Pp 762.It - 763The symbol is a stabs symbol in an a.out object file. In this case, the next 764values printed are the stabs other field, the stabs desc field, and the stab 765type. Stabs symbols are used to hold debugging information. For more information, 766see Top,Stabs,Stabs Overview,stabs.info, The \(lqstabs\(rq debug format. 767.Pp 768.It ? 769The symbol type is unknown, or object file format specific. 770.El 771.Pp 772.It 773The symbol name. 774.El 775.Pp 776The long and short forms of options, shown here as alternatives, are equivalent. 777.Pp 778.Bl -tag -width Ds 779.It -A 780.It -o 781.It --print-file-name 782Precede each symbol by the name of the input file (or archive member) in which 783it was found, rather than identifying the input file once only, before all 784of its symbols. 785.Pp 786.It -a 787.It --debug-syms 788Display all symbols, even debugger-only symbols; normally these are not listed. 789.Pp 790.It -B 791The same as 792.Op --format=bsd 793(for compatibility with the MIPS 794.Xr nm ) . 795.Pp 796.It -C 797.It --demangle[= Va style] 798Decode ( 799.Em demangle ) 800low-level symbol names into user-level names. Besides removing any initial 801underscore prepended by the system, this makes C++ function names readable. 802Different compilers have different mangling styles. The optional demangling 803style argument can be used to choose an appropriate demangling style for your 804compiler.See Section 805.Dq c++filt , 806for more information on demangling. 807.Pp 808.It --no-demangle 809Do not demangle low-level symbol names. This is the default. 810.Pp 811.It -D 812.It --dynamic 813Display the dynamic symbols rather than the normal symbols. This is only meaningful 814for dynamic objects, such as certain types of shared libraries. 815.Pp 816.It -f Va format 817.It --format= Va format 818Use the output format 819.Va format , 820which can be 821.Li bsd , 822.Li sysv , 823or 824.Li posix . 825The default is 826.Li bsd . 827Only the first character of 828.Va format 829is significant; it can be either upper or lower case. 830.Pp 831.It -g 832.It --extern-only 833Display only external symbols. 834.Pp 835.It -l 836.It --line-numbers 837For each symbol, use debugging information to try to find a filename and line 838number. For a defined symbol, look for the line number of the address of the 839symbol. For an undefined symbol, look for the line number of a relocation 840entry which refers to the symbol. If line number information can be found, 841print it after the other symbol information. 842.Pp 843.It -n 844.It -v 845.It --numeric-sort 846Sort symbols numerically by their addresses, rather than alphabetically by 847their names. 848.Pp 849.It -p 850.It --no-sort 851Do not bother to sort the symbols in any order; print them in the order encountered. 852.Pp 853.It -P 854.It --portability 855Use the POSIX.2 standard output format instead of the default format. Equivalent 856to 857.Li -f posix . 858.Pp 859.It -S 860.It --print-size 861Print size, not the value, of defined symbols for the 862.Li bsd 863output format. 864.Pp 865.It -s 866.It --print-armap 867When listing symbols from archive members, include the index: a mapping (stored 868in the archive by 869.Xr ar 870or 871.Xr ranlib ) 872of which modules contain definitions for which names. 873.Pp 874.It -r 875.It --reverse-sort 876Reverse the order of the sort (whether numeric or alphabetic); let the last 877come first. 878.Pp 879.It --size-sort 880Sort symbols by size. The size is computed as the difference between the value 881of the symbol and the value of the symbol with the next higher value. If the 882.Li bsd 883output format is used the size of the symbol is printed, rather than the value, 884and 885.Li -S 886must be used in order both size and value to be printed. 887.Pp 888.It --special-syms 889Display symbols which have a target-specific special meaning. These symbols 890are usually used by the target for some special processing and are not normally 891helpful when included included in the normal symbol lists. For example for 892ARM targets this option would skip the mapping symbols used to mark transitions 893between ARM code, THUMB code and data. 894.Pp 895.It -t Va radix 896.It --radix= Va radix 897Use 898.Va radix 899as the radix for printing the symbol values. It must be 900.Li d 901for decimal, 902.Li o 903for octal, or 904.Li x 905for hexadecimal. 906.Pp 907.It --target= Va bfdname 908Specify an object code format other than your system's default format.See Section 909.Dq Target Selection , 910for more information. 911.Pp 912.It -u 913.It --undefined-only 914Display only undefined symbols (those external to each object file). 915.Pp 916.It --defined-only 917Display only defined symbols for each object file. 918.Pp 919.It -V 920.It --version 921Show the version number of 922.Xr nm 923and exit. 924.Pp 925.It -X 926This option is ignored for compatibility with the AIX version of 927.Xr nm . 928It takes one parameter which must be the string 929.Op 32_64 . 930The default mode of AIX 931.Xr nm 932corresponds to 933.Op -X 32 , 934which is not supported by GNU 935.Xr nm . 936.Pp 937.It --help 938Show a summary of the options to 939.Xr nm 940and exit. 941.El 942.Pp 943.Sh objcopy 944.Bd -literal -offset indent 945objcopy [-F bfdname|--target=bfdname] 946 [-I bfdname|--input-target=bfdname] 947 [-O bfdname|--output-target=bfdname] 948 [-B bfdarch|--binary-architecture=bfdarch] 949 [-S|--strip-all] 950 [-g|--strip-debug] 951 [-K symbolname|--keep-symbol=symbolname] 952 [-N symbolname|--strip-symbol=symbolname] 953 [--strip-unneeded-symbol=symbolname] 954 [-G symbolname|--keep-global-symbol=symbolname] 955 [--localize-hidden] 956 [-L symbolname|--localize-symbol=symbolname] 957 [--globalize-symbol=symbolname] 958 [-W symbolname|--weaken-symbol=symbolname] 959 [-w|--wildcard] 960 [-x|--discard-all] 961 [-X|--discard-locals] 962 [-b byte|--byte=byte] 963 [-i interleave|--interleave=interleave] 964 [-j sectionname|--only-section=sectionname] 965 [-R sectionname|--remove-section=sectionname] 966 [-p|--preserve-dates] 967 [--debugging] 968 [--gap-fill=val] 969 [--pad-to=address] 970 [--set-start=val] 971 [--adjust-start=incr] 972 [--change-addresses=incr] 973 [--change-section-address section{=,+,-}val] 974 [--change-section-lma section{=,+,-}val] 975 [--change-section-vma section{=,+,-}val] 976 [--change-warnings] [--no-change-warnings] 977 [--set-section-flags section=flags] 978 [--add-section sectionname=filename] 979 [--rename-section oldname=newname[,flags]] 980 [--change-leading-char] [--remove-leading-char] 981 [--reverse-bytes=num] 982 [--srec-len=ival] [--srec-forceS3] 983 [--redefine-sym old=new] 984 [--redefine-syms=filename] 985 [--weaken] 986 [--keep-symbols=filename] 987 [--strip-symbols=filename] 988 [--strip-unneeded-symbols=filename] 989 [--keep-global-symbols=filename] 990 [--localize-symbols=filename] 991 [--globalize-symbols=filename] 992 [--weaken-symbols=filename] 993 [--alt-machine-code=index] 994 [--prefix-symbols=string] 995 [--prefix-sections=string] 996 [--prefix-alloc-sections=string] 997 [--add-GNU-debuglink=path-to-file] 998 [--keep-file-symbols] 999 [--only-keep-debug] 1000 [--extract-symbol] 1001 [--writable-text] 1002 [--readonly-text] 1003 [--pure] 1004 [--impure] 1005 [-v|--verbose] 1006 [-V|--version] 1007 [--help] [--info] 1008 infile [outfile] 1009.Ed 1010.Pp 1011The GNU 1012.Xr objcopy 1013utility copies the contents of an object file to another. 1014.Xr objcopy 1015uses the GNU bfd Library to read and write the object files. It can write 1016the destination object file in a format different from that of the source 1017object file. The exact behavior of 1018.Xr objcopy 1019is controlled by command-line options. Note that 1020.Xr objcopy 1021should be able to copy a fully linked file between any two formats. However, 1022copying a relocatable object file between any two formats may not work as 1023expected. 1024.Pp 1025.Xr objcopy 1026creates temporary files to do its translations and deletes them afterward. 1027.Xr objcopy 1028uses bfd to do all its translation work; it has access to all the formats 1029described in bfd and thus is able to recognize most formats without being 1030told explicitly.See Section 1031.Dq BFD . 1032.Pp 1033.Xr objcopy 1034can be used to generate S-records by using an output target of 1035.Li srec 1036(e.g., use 1037.Li -O srec ) . 1038.Pp 1039.Xr objcopy 1040can be used to generate a raw binary file by using an output target of 1041.Li binary 1042(e.g., use 1043.Op -O binary ) . 1044When 1045.Xr objcopy 1046generates a raw binary file, it will essentially produce a memory dump of 1047the contents of the input object file. All symbols and relocation information 1048will be discarded. The memory dump will start at the load address of the lowest 1049section copied into the output file. 1050.Pp 1051When generating an S-record or a raw binary file, it may be helpful to use 1052.Op -S 1053to remove sections containing debugging information. In some cases 1054.Op -R 1055will be useful to remove sections which contain information that is not needed 1056by the binary file. 1057.Pp 1058Note--- 1059.Xr objcopy 1060is not able to change the endianness of its input files. If the input format 1061has an endianness (some formats do not), 1062.Xr objcopy 1063can only copy the inputs into file formats that have the same endianness or 1064which have no endianness (e.g., 1065.Li srec ) . 1066(However, see the 1067.Op --reverse-bytes 1068option.) 1069.Pp 1070.Bl -tag -width Ds 1071.It Va infile 1072.It Va outfile 1073The input and output files, respectively. If you do not specify 1074.Va outfile , 1075.Xr objcopy 1076creates a temporary file and destructively renames the result with the name 1077of 1078.Va infile . 1079.Pp 1080.It -I Va bfdname 1081.It --input-target= Va bfdname 1082Consider the source file's object format to be 1083.Va bfdname , 1084rather than attempting to deduce it.See Section 1085.Dq Target Selection , 1086for more information. 1087.Pp 1088.It -O Va bfdname 1089.It --output-target= Va bfdname 1090Write the output file using the object format 1091.Va bfdname . 1092See Section.Dq Target Selection , 1093for more information. 1094.Pp 1095.It -F Va bfdname 1096.It --target= Va bfdname 1097Use 1098.Va bfdname 1099as the object format for both the input and the output file; i.e., simply 1100transfer data from source to destination with no translation.See Section 1101.Dq Target Selection , 1102for more information. 1103.Pp 1104.It -B Va bfdarch 1105.It --binary-architecture= Va bfdarch 1106Useful when transforming a raw binary input file into an object file. In this 1107case the output architecture can be set to 1108.Va bfdarch . 1109This option will be ignored if the input file has a known 1110.Va bfdarch . 1111You can access this binary data inside a program by referencing the special 1112symbols that are created by the conversion process. These symbols are called 1113_binary_ 1114.Va objfile 1115_start, _binary_ 1116.Va objfile 1117_end and _binary_ 1118.Va objfile 1119_size. e.g. you can transform a picture file into an object file and then 1120access it in your code using these symbols. 1121.Pp 1122.It -j Va sectionname 1123.It --only-section= Va sectionname 1124Copy only the named section from the input file to the output file. This option 1125may be given more than once. Note that using this option inappropriately may 1126make the output file unusable. 1127.Pp 1128.It -R Va sectionname 1129.It --remove-section= Va sectionname 1130Remove any section named 1131.Va sectionname 1132from the output file. This option may be given more than once. Note that using 1133this option inappropriately may make the output file unusable. 1134.Pp 1135.It -S 1136.It --strip-all 1137Do not copy relocation and symbol information from the source file. 1138.Pp 1139.It -g 1140.It --strip-debug 1141Do not copy debugging symbols or sections from the source file. 1142.Pp 1143.It --strip-unneeded 1144Strip all symbols that are not needed for relocation processing. 1145.Pp 1146.It -K Va symbolname 1147.It --keep-symbol= Va symbolname 1148When stripping symbols, keep symbol 1149.Va symbolname 1150even if it would normally be stripped. This option may be given more than 1151once. 1152.Pp 1153.It -N Va symbolname 1154.It --strip-symbol= Va symbolname 1155Do not copy symbol 1156.Va symbolname 1157from the source file. This option may be given more than once. 1158.Pp 1159.It --strip-unneeded-symbol= Va symbolname 1160Do not copy symbol 1161.Va symbolname 1162from the source file unless it is needed by a relocation. This option may 1163be given more than once. 1164.Pp 1165.It -G Va symbolname 1166.It --keep-global-symbol= Va symbolname 1167Keep only symbol 1168.Va symbolname 1169global. Make all other symbols local to the file, so that they are not visible 1170externally. This option may be given more than once. 1171.Pp 1172.It --localize-hidden 1173In an ELF object, mark all symbols that have hidden or internal visibility 1174as local. This option applies on top of symbol-specific localization options 1175such as 1176.Op -L . 1177.Pp 1178.It -L Va symbolname 1179.It --localize-symbol= Va symbolname 1180Make symbol 1181.Va symbolname 1182local to the file, so that it is not visible externally. This option may be 1183given more than once. 1184.Pp 1185.It -W Va symbolname 1186.It --weaken-symbol= Va symbolname 1187Make symbol 1188.Va symbolname 1189weak. This option may be given more than once. 1190.Pp 1191.It --globalize-symbol= Va symbolname 1192Give symbol 1193.Va symbolname 1194global scoping so that it is visible outside of the file in which it is defined. 1195This option may be given more than once. 1196.Pp 1197.It -w 1198.It --wildcard 1199Permit regular expressions in 1200.Va symbolname 1201s used in other command line options. The question mark (?), asterisk (*), 1202backslash (\e) and square brackets ([]) operators can be used anywhere in the 1203symbol name. If the first character of the symbol name is the exclamation 1204point (!) then the sense of the switch is reversed for that symbol. For example: 1205.Pp 1206.Bd -literal -offset indent 1207 -w -W !foo -W fo* 1208.Ed 1209.Pp 1210would cause objcopy to weaken all symbols that start with \(lqfo\(rq except for the 1211symbol \(lqfoo\(rq. 1212.Pp 1213.It -x 1214.It --discard-all 1215Do not copy non-global symbols from the source file. 1216.Pp 1217.It -X 1218.It --discard-locals 1219Do not copy compiler-generated local symbols. (These usually start with 1220.Li L 1221or 1222.Li . . ) 1223.Pp 1224.It -b Va byte 1225.It --byte= Va byte 1226Keep only every 1227.Va byte 1228th byte of the input file (header data is not affected). 1229.Va byte 1230can be in the range from 0 to 1231.Va interleave 1232-1, where 1233.Va interleave 1234is given by the 1235.Op -i 1236or 1237.Op --interleave 1238option, or the default of 4. This option is useful for creating files to program 1239rom. It is typically used with an 1240.Li srec 1241output target. 1242.Pp 1243.It -i Va interleave 1244.It --interleave= Va interleave 1245Only copy one out of every 1246.Va interleave 1247bytes. Select which byte to copy with the 1248.Op -b 1249or 1250.Op --byte 1251option. The default is 4. 1252.Xr objcopy 1253ignores this option if you do not specify either 1254.Op -b 1255or 1256.Op --byte . 1257.Pp 1258.It -p 1259.It --preserve-dates 1260Set the access and modification dates of the output file to be the same as 1261those of the input file. 1262.Pp 1263.It --debugging 1264Convert debugging information, if possible. This is not the default because 1265only certain debugging formats are supported, and the conversion process can 1266be time consuming. 1267.Pp 1268.It --gap-fill Va val 1269Fill gaps between sections with 1270.Va val . 1271This operation applies to the 1272.Em load address 1273(LMA) of the sections. It is done by increasing the size of the section with 1274the lower address, and filling in the extra space created with 1275.Va val . 1276.Pp 1277.It --pad-to Va address 1278Pad the output file up to the load address 1279.Va address . 1280This is done by increasing the size of the last section. The extra space is 1281filled in with the value specified by 1282.Op --gap-fill 1283(default zero). 1284.Pp 1285.It --set-start Va val 1286Set the start address of the new file to 1287.Va val . 1288Not all object file formats support setting the start address. 1289.Pp 1290.It --change-start Va incr 1291.It --adjust-start Va incr 1292Change the start address by adding 1293.Va incr . 1294Not all object file formats support setting the start address. 1295.Pp 1296.It --change-addresses Va incr 1297.It --adjust-vma Va incr 1298Change the VMA and LMA addresses of all sections, as well as the start address, 1299by adding 1300.Va incr . 1301Some object file formats do not permit section addresses to be changed arbitrarily. 1302Note that this does not relocate the sections; if the program expects sections 1303to be loaded at a certain address, and this option is used to change the sections 1304such that they are loaded at a different address, the program may fail. 1305.Pp 1306.It --change-section-address Va section{=,+,-} Va val 1307.It --adjust-section-vma Va section{=,+,-} Va val 1308Set or change both the VMA address and the LMA address of the named 1309.Va section . 1310If 1311.Li = 1312is used, the section address is set to 1313.Va val . 1314Otherwise, 1315.Va val 1316is added to or subtracted from the section address. See the comments under 1317.Op --change-addresses , 1318above. If 1319.Va section 1320does not exist in the input file, a warning will be issued, unless 1321.Op --no-change-warnings 1322is used. 1323.Pp 1324.It --change-section-lma Va section{=,+,-} Va val 1325Set or change the LMA address of the named 1326.Va section . 1327The LMA address is the address where the section will be loaded into memory 1328at program load time. Normally this is the same as the VMA address, which 1329is the address of the section at program run time, but on some systems, especially 1330those where a program is held in ROM, the two can be different. If 1331.Li = 1332is used, the section address is set to 1333.Va val . 1334Otherwise, 1335.Va val 1336is added to or subtracted from the section address. See the comments under 1337.Op --change-addresses , 1338above. If 1339.Va section 1340does not exist in the input file, a warning will be issued, unless 1341.Op --no-change-warnings 1342is used. 1343.Pp 1344.It --change-section-vma Va section{=,+,-} Va val 1345Set or change the VMA address of the named 1346.Va section . 1347The VMA address is the address where the section will be located once the 1348program has started executing. Normally this is the same as the LMA address, 1349which is the address where the section will be loaded into memory, but on 1350some systems, especially those where a program is held in ROM, the two can 1351be different. If 1352.Li = 1353is used, the section address is set to 1354.Va val . 1355Otherwise, 1356.Va val 1357is added to or subtracted from the section address. See the comments under 1358.Op --change-addresses , 1359above. If 1360.Va section 1361does not exist in the input file, a warning will be issued, unless 1362.Op --no-change-warnings 1363is used. 1364.Pp 1365.It --change-warnings 1366.It --adjust-warnings 1367If 1368.Op --change-section-address 1369or 1370.Op --change-section-lma 1371or 1372.Op --change-section-vma 1373is used, and the named section does not exist, issue a warning. This is the 1374default. 1375.Pp 1376.It --no-change-warnings 1377.It --no-adjust-warnings 1378Do not issue a warning if 1379.Op --change-section-address 1380or 1381.Op --adjust-section-lma 1382or 1383.Op --adjust-section-vma 1384is used, even if the named section does not exist. 1385.Pp 1386.It --set-section-flags Va section= Va flags 1387Set the flags for the named section. The 1388.Va flags 1389argument is a comma separated string of flag names. The recognized names are 1390.Li alloc , 1391.Li contents , 1392.Li load , 1393.Li noload , 1394.Li readonly , 1395.Li code , 1396.Li data , 1397.Li rom , 1398.Li share , 1399and 1400.Li debug . 1401You can set the 1402.Li contents 1403flag for a section which does not have contents, but it is not meaningful 1404to clear the 1405.Li contents 1406flag of a section which does have contents--just remove the section instead. 1407Not all flags are meaningful for all object file formats. 1408.Pp 1409.It --add-section Va sectionname= Va filename 1410Add a new section named 1411.Va sectionname 1412while copying the file. The contents of the new section are taken from the 1413file 1414.Va filename . 1415The size of the section will be the size of the file. This option only works 1416on file formats which can support sections with arbitrary names. 1417.Pp 1418.It --rename-section Va oldname= Va newname[, Va flags] 1419Rename a section from 1420.Va oldname 1421to 1422.Va newname , 1423optionally changing the section's flags to 1424.Va flags 1425in the process. This has the advantage over usng a linker script to perform 1426the rename in that the output stays as an object file and does not become 1427a linked executable. 1428.Pp 1429This option is particularly helpful when the input format is binary, since 1430this will always create a section called .data. If for example, you wanted 1431instead to create a section called .rodata containing binary data you could 1432use the following command line to achieve it: 1433.Pp 1434.Bd -literal -offset indent 1435 objcopy -I binary -O <output_format> -B <architecture> \e 1436 --rename-section .data=.rodata,alloc,load,readonly,data,contents \e 1437 <input_binary_file> <output_object_file> 1438.Ed 1439.Pp 1440.It --change-leading-char 1441Some object file formats use special characters at the start of symbols. The 1442most common such character is underscore, which compilers often add before 1443every symbol. This option tells 1444.Xr objcopy 1445to change the leading character of every symbol when it converts between object 1446file formats. If the object file formats use the same leading character, this 1447option has no effect. Otherwise, it will add a character, or remove a character, 1448or change a character, as appropriate. 1449.Pp 1450.It --remove-leading-char 1451If the first character of a global symbol is a special symbol leading character 1452used by the object file format, remove the character. The most common symbol 1453leading character is underscore. This option will remove a leading underscore 1454from all global symbols. This can be useful if you want to link together objects 1455of different file formats with different conventions for symbol names. This 1456is different from 1457.Op --change-leading-char 1458because it always changes the symbol name when appropriate, regardless of 1459the object file format of the output file. 1460.Pp 1461.It --reverse-bytes= Va num 1462Reverse the bytes in a section with output contents. A section length must 1463be evenly divisible by the value given in order for the swap to be able to 1464take place. Reversing takes place before the interleaving is performed. 1465.Pp 1466This option is used typically in generating ROM images for problematic target 1467systems. For example, on some target boards, the 32-bit words fetched from 14688-bit ROMs are re-assembled in little-endian byte order regardless of the 1469CPU byte order. Depending on the programming model, the endianness of the 1470ROM may need to be modified. 1471.Pp 1472Consider a simple file with a section containing the following eight bytes: 1473.Li 12345678 . 1474.Pp 1475Using 1476.Li --reverse-bytes=2 1477for the above example, the bytes in the output file would be ordered 1478.Li 21436587 . 1479.Pp 1480Using 1481.Li --reverse-bytes=4 1482for the above example, the bytes in the output file would be ordered 1483.Li 43218765 . 1484.Pp 1485By using 1486.Li --reverse-bytes=2 1487for the above example, followed by 1488.Li --reverse-bytes=4 1489on the output file, the bytes in the second output file would be ordered 1490.Li 34127856 . 1491.Pp 1492.It --srec-len= Va ival 1493Meaningful only for srec output. Set the maximum length of the Srecords being 1494produced to 1495.Va ival . 1496This length covers both address, data and crc fields. 1497.Pp 1498.It --srec-forceS3 1499Meaningful only for srec output. Avoid generation of S1/S2 records, creating 1500S3-only record format. 1501.Pp 1502.It --redefine-sym Va old= Va new 1503Change the name of a symbol 1504.Va old , 1505to 1506.Va new . 1507This can be useful when one is trying link two things together for which you 1508have no source, and there are name collisions. 1509.Pp 1510.It --redefine-syms= Va filename 1511Apply 1512.Op --redefine-sym 1513to each symbol pair " 1514.Va old 1515.Va new " 1516listed in the file 1517.Va filename . 1518.Va filename 1519is simply a flat file, with one symbol pair per line. Line comments may be 1520introduced by the hash character. This option may be given more than once. 1521.Pp 1522.It --weaken 1523Change all global symbols in the file to be weak. This can be useful when 1524building an object which will be linked against other objects using the 1525.Op -R 1526option to the linker. This option is only effective when using an object file 1527format which supports weak symbols. 1528.Pp 1529.It --keep-symbols= Va filename 1530Apply 1531.Op --keep-symbol 1532option to each symbol listed in the file 1533.Va filename . 1534.Va filename 1535is simply a flat file, with one symbol name per line. Line comments may be 1536introduced by the hash character. This option may be given more than once. 1537.Pp 1538.It --strip-symbols= Va filename 1539Apply 1540.Op --strip-symbol 1541option to each symbol listed in the file 1542.Va filename . 1543.Va filename 1544is simply a flat file, with one symbol name per line. Line comments may be 1545introduced by the hash character. This option may be given more than once. 1546.Pp 1547.It --strip-unneeded-symbols= Va filename 1548Apply 1549.Op --strip-unneeded-symbol 1550option to each symbol listed in the file 1551.Va filename . 1552.Va filename 1553is simply a flat file, with one symbol name per line. Line comments may be 1554introduced by the hash character. This option may be given more than once. 1555.Pp 1556.It --keep-global-symbols= Va filename 1557Apply 1558.Op --keep-global-symbol 1559option to each symbol listed in the file 1560.Va filename . 1561.Va filename 1562is simply a flat file, with one symbol name per line. Line comments may be 1563introduced by the hash character. This option may be given more than once. 1564.Pp 1565.It --localize-symbols= Va filename 1566Apply 1567.Op --localize-symbol 1568option to each symbol listed in the file 1569.Va filename . 1570.Va filename 1571is simply a flat file, with one symbol name per line. Line comments may be 1572introduced by the hash character. This option may be given more than once. 1573.Pp 1574.It --globalize-symbols= Va filename 1575Apply 1576.Op --globalize-symbol 1577option to each symbol listed in the file 1578.Va filename . 1579.Va filename 1580is simply a flat file, with one symbol name per line. Line comments may be 1581introduced by the hash character. This option may be given more than once. 1582.Pp 1583.It --weaken-symbols= Va filename 1584Apply 1585.Op --weaken-symbol 1586option to each symbol listed in the file 1587.Va filename . 1588.Va filename 1589is simply a flat file, with one symbol name per line. Line comments may be 1590introduced by the hash character. This option may be given more than once. 1591.Pp 1592.It --alt-machine-code= Va index 1593If the output architecture has alternate machine codes, use the 1594.Va index 1595th code instead of the default one. This is useful in case a machine is assigned 1596an official code and the tool-chain adopts the new code, but other applications 1597still depend on the original code being used. For ELF based architectures 1598if the 1599.Va index 1600alternative does not exist then the value is treated as an absolute number 1601to be stored in the e_machine field of the ELF header. 1602.Pp 1603.It --writable-text 1604Mark the output text as writable. This option isn't meaningful for all object 1605file formats. 1606.Pp 1607.It --readonly-text 1608Make the output text write protected. This option isn't meaningful for all 1609object file formats. 1610.Pp 1611.It --pure 1612Mark the output file as demand paged. This option isn't meaningful for all 1613object file formats. 1614.Pp 1615.It --impure 1616Mark the output file as impure. This option isn't meaningful for all object 1617file formats. 1618.Pp 1619.It --prefix-symbols= Va string 1620Prefix all symbols in the output file with 1621.Va string . 1622.Pp 1623.It --prefix-sections= Va string 1624Prefix all section names in the output file with 1625.Va string . 1626.Pp 1627.It --prefix-alloc-sections= Va string 1628Prefix all the names of all allocated sections in the output file with 1629.Va string . 1630.Pp 1631.It --add-GNU-debuglink= Va path-to-file 1632Creates a .GNU_debuglink section which contains a reference to 1633.Va path-to-file 1634and adds it to the output file. 1635.Pp 1636.It --keep-file-symbols 1637When stripping a file, perhaps with 1638.Op --strip-debug 1639or 1640.Op --strip-unneeded , 1641retain any symbols specifying source file names, which would otherwise get 1642stripped. 1643.Pp 1644.It --only-keep-debug 1645Strip a file, removing contents of any sections that would not be stripped 1646by 1647.Op --strip-debug 1648and leaving the debugging sections intact. In ELF files, this preserves all 1649note sections in the output. 1650.Pp 1651The intention is that this option will be used in conjunction with 1652.Op --add-GNU-debuglink 1653to create a two part executable. One a stripped binary which will occupy less 1654space in RAM and in a distribution and the second a debugging information 1655file which is only needed if debugging abilities are required. The suggested 1656procedure to create these files is as follows: 1657.Pp 1658.Bl -enum 1659.It 1660Link the executable as normal. Assuming that is is called 1661.Li foo 1662then... 1663.It 1664Run 1665.Li objcopy --only-keep-debug foo foo.dbg 1666to 1667create a file containing the debugging info. 1668.It 1669Run 1670.Li objcopy --strip-debug foo 1671to create a 1672stripped executable. 1673.It 1674Run 1675.Li objcopy --add-GNU-debuglink=foo.dbg foo 1676to add a link to the debugging info into the stripped executable. 1677.El 1678.Pp 1679Note - the choice of 1680.Li .dbg 1681as an extension for the debug info file is arbitrary. Also the 1682.Li --only-keep-debug 1683step is optional. You could instead do this: 1684.Pp 1685.Bl -enum 1686.It 1687Link the executable as normal. 1688.It 1689Copy 1690.Li foo 1691to 1692.Li foo.full 1693.It 1694Run 1695.Li objcopy --strip-debug foo 1696.It 1697Run 1698.Li objcopy --add-GNU-debuglink=foo.full foo 1699.El 1700.Pp 1701i.e., the file pointed to by the 1702.Op --add-GNU-debuglink 1703can be the full executable. It does not have to be a file created by the 1704.Op --only-keep-debug 1705switch. 1706.Pp 1707Note - this switch is only intended for use on fully linked files. It does 1708not make sense to use it on object files where the debugging information may 1709be incomplete. Besides the GNU_debuglink feature currently only supports the 1710presence of one filename containing debugging information, not multiple filenames 1711on a one-per-object-file basis. 1712.Pp 1713.It --extract-symbol 1714Keep the file's section flags and symbols but remove all section data. Specifically, 1715the option: 1716.Pp 1717.Bl -bullet 1718.It 1719sets the virtual and load addresses of every section to zero; 1720.It 1721removes the contents of all sections; 1722.It 1723sets the size of every section to zero; and 1724.It 1725sets the file's start address to zero. 1726.El 1727.Pp 1728This option is used to build a 1729.Pa .sym 1730file for a VxWorks kernel. It can also be a useful way of reducing the size 1731of a 1732.Op --just-symbols 1733linker input file. 1734.Pp 1735.It -V 1736.It --version 1737Show the version number of 1738.Xr objcopy . 1739.Pp 1740.It -v 1741.It --verbose 1742Verbose output: list all object files modified. In the case of archives, 1743.Li objcopy -V 1744lists all members of the archive. 1745.Pp 1746.It --help 1747Show a summary of the options to 1748.Xr objcopy . 1749.Pp 1750.It --info 1751Display a list showing all architectures and object formats available. 1752.El 1753.Pp 1754.Sh objdump 1755.Bd -literal -offset indent 1756objdump [-a|--archive-headers] 1757 [-b bfdname|--target=bfdname] 1758 [-C|--demangle[=style] ] 1759 [-d|--disassemble] 1760 [-D|--disassemble-all] 1761 [-z|--disassemble-zeroes] 1762 [-EB|-EL|--endian={big | little }] 1763 [-f|--file-headers] 1764 [--file-start-context] 1765 [-g|--debugging] 1766 [-e|--debugging-tags] 1767 [-h|--section-headers|--headers] 1768 [-i|--info] 1769 [-j section|--section=section] 1770 [-l|--line-numbers] 1771 [-S|--source] 1772 [-m machine|--architecture=machine] 1773 [-M options|--disassembler-options=options] 1774 [-p|--private-headers] 1775 [-r|--reloc] 1776 [-R|--dynamic-reloc] 1777 [-s|--full-contents] 1778 [-W|--dwarf] 1779 [-G|--stabs] 1780 [-t|--syms] 1781 [-T|--dynamic-syms] 1782 [-x|--all-headers] 1783 [-w|--wide] 1784 [--start-address=address] 1785 [--stop-address=address] 1786 [--prefix-addresses] 1787 [--[no-]show-raw-insn] 1788 [--adjust-vma=offset] 1789 [--special-syms] 1790 [-V|--version] 1791 [-H|--help] 1792 objfile... 1793.Ed 1794.Pp 1795.Xr objdump 1796displays information about one or more object files. The options control what 1797particular information to display. This information is mostly useful to programmers 1798who are working on the compilation tools, as opposed to programmers who just 1799want their program to compile and work. 1800.Pp 1801.Va objfile 1802\&...are the object files to be examined. When you specify archives, 1803.Xr objdump 1804shows information on each of the member object files. 1805.Pp 1806The long and short forms of options, shown here as alternatives, are equivalent. 1807At least one option from the list 1808.Op -a,-d,-D,-e,-f,-g,-G,-h,-H,-p,-r,-R,-s,-S,-t,-T,-V,-x 1809must be given. 1810.Pp 1811.Bl -tag -width Ds 1812.It -a 1813.It --archive-header 1814If any of the 1815.Va objfile 1816files are archives, display the archive header information (in a format similar 1817to 1818.Li ls -l ) . 1819Besides the information you could list with 1820.Li ar tv , 1821.Li objdump -a 1822shows the object file format of each archive member. 1823.Pp 1824.It --adjust-vma= Va offset 1825When dumping information, first add 1826.Va offset 1827to all the section addresses. This is useful if the section addresses do not 1828correspond to the symbol table, which can happen when putting sections at 1829particular addresses when using a format which can not represent section addresses, 1830such as a.out. 1831.Pp 1832.It -b Va bfdname 1833.It --target= Va bfdname 1834Specify that the object-code format for the object files is 1835.Va bfdname . 1836This option may not be necessary; 1837.Va objdump 1838can automatically recognize many formats. 1839.Pp 1840For example, 1841.Bd -literal -offset indent 1842objdump -b oasys -m vax -h fu.o 1843.Ed 1844displays summary information from the section headers ( 1845.Op -h ) 1846of 1847.Pa fu.o , 1848which is explicitly identified ( 1849.Op -m ) 1850as a VAX object file in the format produced by Oasys compilers. You can list 1851the formats available with the 1852.Op -i 1853option.See Section 1854.Dq Target Selection , 1855for more information. 1856.Pp 1857.It -C 1858.It --demangle[= Va style] 1859Decode ( 1860.Em demangle ) 1861low-level symbol names into user-level names. Besides removing any initial 1862underscore prepended by the system, this makes C++ function names readable. 1863Different compilers have different mangling styles. The optional demangling 1864style argument can be used to choose an appropriate demangling style for your 1865compiler.See Section 1866.Dq c++filt , 1867for more information on demangling. 1868.Pp 1869.It -g 1870.It --debugging 1871Display debugging information. This attempts to parse debugging information 1872stored in the file and print it out using a C like syntax. Only certain types 1873of debugging information have been implemented. Some other types are supported 1874by 1875.Xr readelf -w . 1876See Section.Dq readelf . 1877.Pp 1878.It -e 1879.It --debugging-tags 1880Like 1881.Op -g , 1882but the information is generated in a format compatible with ctags tool. 1883.Pp 1884.It -d 1885.It --disassemble 1886Display the assembler mnemonics for the machine instructions from 1887.Va objfile . 1888This option only disassembles those sections which are expected to contain 1889instructions. 1890.Pp 1891.It -D 1892.It --disassemble-all 1893Like 1894.Op -d , 1895but disassemble the contents of all sections, not just those expected to contain 1896instructions. 1897.Pp 1898.It --prefix-addresses 1899When disassembling, print the complete address on each line. This is the older 1900disassembly format. 1901.Pp 1902.It -EB 1903.It -EL 1904.It --endian={big|little} 1905Specify the endianness of the object files. This only affects disassembly. 1906This can be useful when disassembling a file format which does not describe 1907endianness information, such as S-records. 1908.Pp 1909.It -f 1910.It --file-headers 1911Display summary information from the overall header of each of the 1912.Va objfile 1913files. 1914.Pp 1915.It --file-start-context 1916Specify that when displaying interlisted source code/disassembly (assumes 1917.Op -S ) 1918from a file that has not yet been displayed, extend the context to the start 1919of the file. 1920.Pp 1921.It -h 1922.It --section-headers 1923.It --headers 1924Display summary information from the section headers of the object file. 1925.Pp 1926File segments may be relocated to nonstandard addresses, for example by using 1927the 1928.Op -Ttext , 1929.Op -Tdata , 1930or 1931.Op -Tbss 1932options to 1933.Xr ld . 1934However, some object file formats, such as a.out, do not store the starting 1935address of the file segments. In those situations, although 1936.Xr ld 1937relocates the sections correctly, using 1938.Li objdump -h 1939to list the file section headers cannot show the correct addresses. Instead, 1940it shows the usual addresses, which are implicit for the target. 1941.Pp 1942.It -H 1943.It --help 1944Print a summary of the options to 1945.Xr objdump 1946and exit. 1947.Pp 1948.It -i 1949.It --info 1950Display a list showing all architectures and object formats available for 1951specification with 1952.Op -b 1953or 1954.Op -m . 1955.Pp 1956.It -j Va name 1957.It --section= Va name 1958Display information only for section 1959.Va name . 1960.Pp 1961.It -l 1962.It --line-numbers 1963Label the display (using debugging information) with the filename and source 1964line numbers corresponding to the object code or relocs shown. Only useful 1965with 1966.Op -d , 1967.Op -D , 1968or 1969.Op -r . 1970.Pp 1971.It -m Va machine 1972.It --architecture= Va machine 1973Specify the architecture to use when disassembling object files. This can 1974be useful when disassembling object files which do not describe architecture 1975information, such as S-records. You can list the available architectures with 1976the 1977.Op -i 1978option. 1979.Pp 1980.It -M Va options 1981.It --disassembler-options= Va options 1982Pass target specific information to the disassembler. Only supported on some 1983targets. If it is necessary to specify more than one disassembler option then 1984multiple 1985.Op -M 1986options can be used or can be placed together into a comma separated list. 1987.Pp 1988If the target is an ARM architecture then this switch can be used to select 1989which register name set is used during disassembler. Specifying 1990.Op -M reg-names-std 1991(the default) will select the register names as used in ARM's instruction 1992set documentation, but with register 13 called 'sp', register 14 called 'lr' 1993and register 15 called 'pc'. Specifying 1994.Op -M reg-names-apcs 1995will select the name set used by the ARM Procedure Call Standard, whilst specifying 1996.Op -M reg-names-raw 1997will just use 1998.Li r 1999followed by the register number. 2000.Pp 2001There are also two variants on the APCS register naming scheme enabled by 2002.Op -M reg-names-atpcs 2003and 2004.Op -M reg-names-special-atpcs 2005which use the ARM/Thumb Procedure Call Standard naming conventions. (Either 2006with the normal register names or the special register names). 2007.Pp 2008This option can also be used for ARM architectures to force the disassembler 2009to interpret all instructions as Thumb instructions by using the switch 2010.Op --disassembler-options=force-thumb . 2011This can be useful when attempting to disassemble thumb code produced by other 2012compilers. 2013.Pp 2014For the x86, some of the options duplicate functions of the 2015.Op -m 2016switch, but allow finer grained control. Multiple selections from the following 2017may be specified as a comma separated string. 2018.Op x86-64 , 2019.Op i386 2020and 2021.Op i8086 2022select disassembly for the given architecture. 2023.Op intel 2024and 2025.Op att 2026select between intel syntax mode and AT&T syntax mode. 2027.Op addr64 , 2028.Op addr32 , 2029.Op addr16 , 2030.Op data32 2031and 2032.Op data16 2033specify the default address size and operand size. These four options will 2034be overridden if 2035.Op x86-64 , 2036.Op i386 2037or 2038.Op i8086 2039appear later in the option string. Lastly, 2040.Op suffix , 2041when in AT&T mode, instructs the disassembler to print a mnemonic suffix even 2042when the suffix could be inferred by the operands. 2043.Pp 2044For PPC, 2045.Op booke , 2046.Op booke32 2047and 2048.Op booke64 2049select disassembly of BookE instructions. 2050.Op 32 2051and 2052.Op 64 2053select PowerPC and PowerPC64 disassembly, respectively. 2054.Op e300 2055selects disassembly for the e300 family. 2056.Op 440 2057selects disassembly for the PowerPC 440. 2058.Pp 2059For MIPS, this option controls the printing of instruction mnemonic names 2060and register names in disassembled instructions. Multiple selections from 2061the following may be specified as a comma separated string, and invalid options 2062are ignored: 2063.Pp 2064.Bl -tag -width Ds 2065.It no-aliases 2066Print the 'raw' instruction mnemonic instead of some pseudo instruction mnemonic. 2067I.e., print 'daddu' or 'or' instead of 'move', 'sll' instead of 'nop', etc. 2068.Pp 2069.It gpr-names= Va ABI 2070Print GPR (general-purpose register) names as appropriate for the specified 2071ABI. By default, GPR names are selected according to the ABI of the binary 2072being disassembled. 2073.Pp 2074.It fpr-names= Va ABI 2075Print FPR (floating-point register) names as appropriate for the specified 2076ABI. By default, FPR numbers are printed rather than names. 2077.Pp 2078.It cp0-names= Va ARCH 2079Print CP0 (system control coprocessor; coprocessor 0) register names as appropriate 2080for the CPU or architecture specified by 2081.Va ARCH . 2082By default, CP0 register names are selected according to the architecture 2083and CPU of the binary being disassembled. 2084.Pp 2085.It hwr-names= Va ARCH 2086Print HWR (hardware register, used by the 2087.Li rdhwr 2088instruction) names as appropriate for the CPU or architecture specified by 2089.Va ARCH . 2090By default, HWR names are selected according to the architecture and CPU of 2091the binary being disassembled. 2092.Pp 2093.It reg-names= Va ABI 2094Print GPR and FPR names as appropriate for the selected ABI. 2095.Pp 2096.It reg-names= Va ARCH 2097Print CPU-specific register names (CP0 register and HWR names) as appropriate 2098for the selected CPU or architecture. 2099.El 2100.Pp 2101For any of the options listed above, 2102.Va ABI 2103or 2104.Va ARCH 2105may be specified as 2106.Li numeric 2107to have numbers printed rather than names, for the selected types of registers. 2108You can list the available values of 2109.Va ABI 2110and 2111.Va ARCH 2112using the 2113.Op --help 2114option. 2115.Pp 2116For VAX, you can specify function entry addresses with 2117.Op -M entry:0xf00ba . 2118You can use this multiple times to properly disassemble VAX binary files that 2119don't contain symbol tables (like ROM dumps). In these cases, the function 2120entry mask would otherwise be decoded as VAX instructions, which would probably 2121lead the rest of the function being wrongly disassembled. 2122.Pp 2123.It -p 2124.It --private-headers 2125Print information that is specific to the object file format. The exact information 2126printed depends upon the object file format. For some object file formats, 2127no additional information is printed. 2128.Pp 2129.It -r 2130.It --reloc 2131Print the relocation entries of the file. If used with 2132.Op -d 2133or 2134.Op -D , 2135the relocations are printed interspersed with the disassembly. 2136.Pp 2137.It -R 2138.It --dynamic-reloc 2139Print the dynamic relocation entries of the file. This is only meaningful 2140for dynamic objects, such as certain types of shared libraries. 2141.Pp 2142.It -s 2143.It --full-contents 2144Display the full contents of any sections requested. By default all non-empty 2145sections are displayed. 2146.Pp 2147.It -S 2148.It --source 2149Display source code intermixed with disassembly, if possible. Implies 2150.Op -d . 2151.Pp 2152.It --show-raw-insn 2153When disassembling instructions, print the instruction in hex as well as in 2154symbolic form. This is the default except when 2155.Op --prefix-addresses 2156is used. 2157.Pp 2158.It --no-show-raw-insn 2159When disassembling instructions, do not print the instruction bytes. This 2160is the default when 2161.Op --prefix-addresses 2162is used. 2163.Pp 2164.It -W 2165.It --dwarf 2166Displays the contents of the DWARF debug sections in the file, if any are 2167present. 2168.Pp 2169.It -G 2170.It --stabs 2171Display the full contents of any sections requested. Display the contents 2172of the .stab and .stab.index and .stab.excl sections from an ELF file. This 2173is only useful on systems (such as Solaris 2.0) in which 2174.Li .stab 2175debugging symbol-table entries are carried in an ELF section. In most other 2176file formats, debugging symbol-table entries are interleaved with linkage 2177symbols, and are visible in the 2178.Op --syms 2179output. For more information on stabs symbols, see Top,Stabs,Stabs Overview,stabs.info, 2180The \(lqstabs\(rq debug format. 2181.Pp 2182.It --start-address= Va address 2183Start displaying data at the specified address. This affects the output of 2184the 2185.Op -d , 2186.Op -r 2187and 2188.Op -s 2189options. 2190.Pp 2191.It --stop-address= Va address 2192Stop displaying data at the specified address. This affects the output of 2193the 2194.Op -d , 2195.Op -r 2196and 2197.Op -s 2198options. 2199.Pp 2200.It -t 2201.It --syms 2202Print the symbol table entries of the file. This is similar to the information 2203provided by the 2204.Li nm 2205program. 2206.Pp 2207.It -T 2208.It --dynamic-syms 2209Print the dynamic symbol table entries of the file. This is only meaningful 2210for dynamic objects, such as certain types of shared libraries. This is similar 2211to the information provided by the 2212.Li nm 2213program when given the 2214.Op -D 2215( 2216.Op --dynamic ) 2217option. 2218.Pp 2219.It --special-syms 2220When displaying symbols include those which the target considers to be special 2221in some way and which would not normally be of interest to the user. 2222.Pp 2223.It -V 2224.It --version 2225Print the version number of 2226.Xr objdump 2227and exit. 2228.Pp 2229.It -x 2230.It --all-headers 2231Display all available header information, including the symbol table and relocation 2232entries. Using 2233.Op -x 2234is equivalent to specifying all of 2235.Op -a -f -h -p -r -t . 2236.Pp 2237.It -w 2238.It --wide 2239Format some lines for output devices that have more than 80 columns. Also 2240do not truncate symbol names when they are displayed. 2241.Pp 2242.It -z 2243.It --disassemble-zeroes 2244Normally the disassembly output will skip blocks of zeroes. This option directs 2245the disassembler to disassemble those blocks, just like any other data. 2246.El 2247.Pp 2248.Sh ranlib 2249.Bd -literal -offset indent 2250ranlib [-vV] archive 2251.Ed 2252.Pp 2253.Xr ranlib 2254generates an index to the contents of an archive and stores it in the archive. 2255The index lists each symbol defined by a member of an archive that is a relocatable 2256object file. 2257.Pp 2258You may use 2259.Li nm -s 2260or 2261.Li nm --print-armap 2262to list this index. 2263.Pp 2264An archive with such an index speeds up linking to the library and allows 2265routines in the library to call each other without regard to their placement 2266in the archive. 2267.Pp 2268The GNU 2269.Xr ranlib 2270program is another form of GNU 2271.Xr ar ; 2272running 2273.Xr ranlib 2274is completely equivalent to executing 2275.Li ar -s . 2276See Section.Dq ar . 2277.Pp 2278.Bl -tag -width Ds 2279.It -v 2280.It -V 2281.It --version 2282Show the version number of 2283.Xr ranlib . 2284.El 2285.Pp 2286.Sh size 2287.Bd -literal -offset indent 2288size [-A|-B|--format=compatibility] 2289 [--help] 2290 [-d|-o|-x|--radix=number] 2291 [-t|--totals] 2292 [--target=bfdname] [-V|--version] 2293 [objfile...] 2294.Ed 2295.Pp 2296The GNU 2297.Xr size 2298utility lists the section sizes---and the total size---for each of the object 2299or archive files 2300.Va objfile 2301in its argument list. By default, one line of output is generated for each 2302object file or each module in an archive. 2303.Pp 2304.Va objfile 2305\&...are the object files to be examined. If none are specified, the file 2306.Li a.out 2307will be used. 2308.Pp 2309The command line options have the following meanings: 2310.Pp 2311.Bl -tag -width Ds 2312.It -A 2313.It -B 2314.It --format= Va compatibility 2315Using one of these options, you can choose whether the output from GNU 2316.Xr size 2317resembles output from System V 2318.Xr size 2319(using 2320.Op -A , 2321or 2322.Op --format=sysv ) , 2323or Berkeley 2324.Xr size 2325(using 2326.Op -B , 2327or 2328.Op --format=berkeley ) . 2329The default is the one-line format similar to Berkeley's. 2330.Pp 2331Here is an example of the Berkeley (default) format of output from 2332.Xr size : 2333.Bd -literal -offset indent 2334$ size --format=Berkeley ranlib size 2335text data bss dec hex filename 2336294880 81920 11592 388392 5ed28 ranlib 2337294880 81920 11888 388688 5ee50 size 2338.Ed 2339.Pp 2340This is the same data, but displayed closer to System V conventions: 2341.Pp 2342.Bd -literal -offset indent 2343$ size --format=SysV ranlib size 2344ranlib : 2345section size addr 2346\&.text 294880 8192 2347\&.data 81920 303104 2348\&.bss 11592 385024 2349Total 388392 2350 2351 2352size : 2353section size addr 2354\&.text 294880 8192 2355\&.data 81920 303104 2356\&.bss 11888 385024 2357Total 388688 2358.Ed 2359.Pp 2360.It --help 2361Show a summary of acceptable arguments and options. 2362.Pp 2363.It -d 2364.It -o 2365.It -x 2366.It --radix= Va number 2367Using one of these options, you can control whether the size of each section 2368is given in decimal ( 2369.Op -d , 2370or 2371.Op --radix=10 ) ; 2372octal ( 2373.Op -o , 2374or 2375.Op --radix=8 ) ; 2376or hexadecimal ( 2377.Op -x , 2378or 2379.Op --radix=16 ) . 2380In 2381.Op --radix= Va number , 2382only the three values (8, 10, 16) are supported. The total size is always 2383given in two radices; decimal and hexadecimal for 2384.Op -d 2385or 2386.Op -x 2387output, or octal and hexadecimal if you're using 2388.Op -o . 2389.Pp 2390.It -t 2391.It --totals 2392Show totals of all objects listed (Berkeley format listing mode only). 2393.Pp 2394.It --target= Va bfdname 2395Specify that the object-code format for 2396.Va objfile 2397is 2398.Va bfdname . 2399This option may not be necessary; 2400.Xr size 2401can automatically recognize many formats.See Section 2402.Dq Target Selection , 2403for more information. 2404.Pp 2405.It -V 2406.It --version 2407Display the version number of 2408.Xr size . 2409.El 2410.Pp 2411.Sh strings 2412.Bd -literal -offset indent 2413strings [-afov] [-min-len] 2414 [-n min-len] [--bytes=min-len] 2415 [-t radix] [--radix=radix] 2416 [-e encoding] [--encoding=encoding] 2417 [-] [--all] [--print-file-name] 2418 [-T bfdname] [--target=bfdname] 2419 [--help] [--version] file... 2420.Ed 2421.Pp 2422For each 2423.Va file 2424given, GNU 2425.Xr strings 2426prints the printable character sequences that are at least 4 characters long 2427(or the number given with the options below) and are followed by an unprintable 2428character. By default, it only prints the strings from the initialized and 2429loaded sections of object files; for other types of files, it prints the strings 2430from the whole file. 2431.Pp 2432.Xr strings 2433is mainly useful for determining the contents of non-text files. 2434.Pp 2435.Bl -tag -width Ds 2436.It -a 2437.It --all 2438.It - 2439Do not scan only the initialized and loaded sections of object files; scan 2440the whole files. 2441.Pp 2442.It -f 2443.It --print-file-name 2444Print the name of the file before each string. 2445.Pp 2446.It --help 2447Print a summary of the program usage on the standard output and exit. 2448.Pp 2449.It - Va min-len 2450.It -n Va min-len 2451.It --bytes= Va min-len 2452Print sequences of characters that are at least 2453.Va min-len 2454characters long, instead of the default 4. 2455.Pp 2456.It -o 2457Like 2458.Li -t o . 2459Some other versions of 2460.Xr strings 2461have 2462.Op -o 2463act like 2464.Li -t d 2465instead. Since we can not be compatible with both ways, we simply chose one. 2466.Pp 2467.It -t Va radix 2468.It --radix= Va radix 2469Print the offset within the file before each string. The single character 2470argument specifies the radix of the offset--- 2471.Li o 2472for octal, 2473.Li x 2474for hexadecimal, or 2475.Li d 2476for decimal. 2477.Pp 2478.It -e Va encoding 2479.It --encoding= Va encoding 2480Select the character encoding of the strings that are to be found. Possible 2481values for 2482.Va encoding 2483are: 2484.Li s 2485= single-7-bit-byte characters (ASCII, ISO 8859, etc., default), 2486.Li S 2487= single-8-bit-byte characters, 2488.Li b 2489= 16-bit bigendian, 2490.Li l 2491= 16-bit littleendian, 2492.Li B 2493= 32-bit bigendian, 2494.Li L 2495= 32-bit littleendian. Useful for finding wide character strings. 2496.Pp 2497.It -T Va bfdname 2498.It --target= Va bfdname 2499Specify an object code format other than your system's default format.See Section 2500.Dq Target Selection , 2501for more information. 2502.Pp 2503.It -v 2504.It --version 2505Print the program version number on the standard output and exit. 2506.El 2507.Pp 2508.Sh strip 2509.Bd -literal -offset indent 2510strip [-F bfdname |--target=bfdname] 2511 [-I bfdname |--input-target=bfdname] 2512 [-O bfdname |--output-target=bfdname] 2513 [-s|--strip-all] 2514 [-S|-g|-d|--strip-debug] 2515 [-K symbolname |--keep-symbol=symbolname] 2516 [-N symbolname |--strip-symbol=symbolname] 2517 [-w|--wildcard] 2518 [-x|--discard-all] [-X |--discard-locals] 2519 [-R sectionname |--remove-section=sectionname] 2520 [-o file] [-p|--preserve-dates] 2521 [--keep-file-symbols] 2522 [--only-keep-debug] 2523 [-v |--verbose] [-V|--version] 2524 [--help] [--info] 2525 objfile... 2526.Ed 2527.Pp 2528GNU 2529.Xr strip 2530discards all symbols from object files 2531.Va objfile . 2532The list of object files may include archives. At least one object file must 2533be given. 2534.Pp 2535.Xr strip 2536modifies the files named in its argument, rather than writing modified copies 2537under different names. 2538.Pp 2539.Bl -tag -width Ds 2540.It -F Va bfdname 2541.It --target= Va bfdname 2542Treat the original 2543.Va objfile 2544as a file with the object code format 2545.Va bfdname , 2546and rewrite it in the same format.See Section 2547.Dq Target Selection , 2548for more information. 2549.Pp 2550.It --help 2551Show a summary of the options to 2552.Xr strip 2553and exit. 2554.Pp 2555.It --info 2556Display a list showing all architectures and object formats available. 2557.Pp 2558.It -I Va bfdname 2559.It --input-target= Va bfdname 2560Treat the original 2561.Va objfile 2562as a file with the object code format 2563.Va bfdname . 2564See Section.Dq Target Selection , 2565for more information. 2566.Pp 2567.It -O Va bfdname 2568.It --output-target= Va bfdname 2569Replace 2570.Va objfile 2571with a file in the output format 2572.Va bfdname . 2573See Section.Dq Target Selection , 2574for more information. 2575.Pp 2576.It -R Va sectionname 2577.It --remove-section= Va sectionname 2578Remove any section named 2579.Va sectionname 2580from the output file. This option may be given more than once. Note that using 2581this option inappropriately may make the output file unusable. 2582.Pp 2583.It -s 2584.It --strip-all 2585Remove all symbols. 2586.Pp 2587.It -g 2588.It -S 2589.It -d 2590.It --strip-debug 2591Remove debugging symbols only. 2592.Pp 2593.It --strip-unneeded 2594Remove all symbols that are not needed for relocation processing. 2595.Pp 2596.It -K Va symbolname 2597.It --keep-symbol= Va symbolname 2598When stripping symbols, keep symbol 2599.Va symbolname 2600even if it would normally be stripped. This option may be given more than 2601once. 2602.Pp 2603.It -N Va symbolname 2604.It --strip-symbol= Va symbolname 2605Remove symbol 2606.Va symbolname 2607from the source file. This option may be given more than once, and may be 2608combined with strip options other than 2609.Op -K . 2610.Pp 2611.It -o Va file 2612Put the stripped output in 2613.Va file , 2614rather than replacing the existing file. When this argument is used, only 2615one 2616.Va objfile 2617argument may be specified. 2618.Pp 2619.It -p 2620.It --preserve-dates 2621Preserve the access and modification dates of the file. 2622.Pp 2623.It -w 2624.It --wildcard 2625Permit regular expressions in 2626.Va symbolname 2627s used in other command line options. The question mark (?), asterisk (*), 2628backslash (\e) and square brackets ([]) operators can be used anywhere in the 2629symbol name. If the first character of the symbol name is the exclamation 2630point (!) then the sense of the switch is reversed for that symbol. For example: 2631.Pp 2632.Bd -literal -offset indent 2633 -w -K !foo -K fo* 2634.Ed 2635.Pp 2636would cause strip to only keep symbols that start with the letters \(lqfo\(rq, but 2637to discard the symbol \(lqfoo\(rq. 2638.Pp 2639.It -x 2640.It --discard-all 2641Remove non-global symbols. 2642.Pp 2643.It -X 2644.It --discard-locals 2645Remove compiler-generated local symbols. (These usually start with 2646.Li L 2647or 2648.Li . . ) 2649.Pp 2650.It --keep-file-symbols 2651When stripping a file, perhaps with 2652.Op --strip-debug 2653or 2654.Op --strip-unneeded , 2655retain any symbols specifying source file names, which would otherwise get 2656stripped. 2657.Pp 2658.It --only-keep-debug 2659Strip a file, removing contents of any sections that would not be stripped 2660by 2661.Op --strip-debug 2662and leaving the debugging sections intact. In ELF files, this preserves all 2663note sections in the output. 2664.Pp 2665The intention is that this option will be used in conjunction with 2666.Op --add-GNU-debuglink 2667to create a two part executable. One a stripped binary which will occupy less 2668space in RAM and in a distribution and the second a debugging information 2669file which is only needed if debugging abilities are required. The suggested 2670procedure to create these files is as follows: 2671.Pp 2672.Bl -enum 2673.It 2674Link the executable as normal. Assuming that is is called 2675.Li foo 2676then... 2677.It 2678Run 2679.Li objcopy --only-keep-debug foo foo.dbg 2680to 2681create a file containing the debugging info. 2682.It 2683Run 2684.Li objcopy --strip-debug foo 2685to create a 2686stripped executable. 2687.It 2688Run 2689.Li objcopy --add-GNU-debuglink=foo.dbg foo 2690to add a link to the debugging info into the stripped executable. 2691.El 2692.Pp 2693Note - the choice of 2694.Li .dbg 2695as an extension for the debug info file is arbitrary. Also the 2696.Li --only-keep-debug 2697step is optional. You could instead do this: 2698.Pp 2699.Bl -enum 2700.It 2701Link the executable as normal. 2702.It 2703Copy 2704.Li foo 2705to 2706.Li foo.full 2707.It 2708Run 2709.Li strip --strip-debug foo 2710.It 2711Run 2712.Li objcopy --add-GNU-debuglink=foo.full foo 2713.El 2714.Pp 2715ie the file pointed to by the 2716.Op --add-GNU-debuglink 2717can be the full executable. It does not have to be a file created by the 2718.Op --only-keep-debug 2719switch. 2720.Pp 2721Note - this switch is only intended for use on fully linked files. It does 2722not make sense to use it on object files where the debugging information may 2723be incomplete. Besides the GNU_debuglink feature currently only supports the 2724presence of one filename containing debugging information, not multiple filenames 2725on a one-per-object-file basis. 2726.Pp 2727.It -V 2728.It --version 2729Show the version number for 2730.Xr strip . 2731.Pp 2732.It -v 2733.It --verbose 2734Verbose output: list all object files modified. In the case of archives, 2735.Li strip -v 2736lists all members of the archive. 2737.El 2738.Pp 2739.Sh c++filt 2740.Bd -literal -offset indent 2741c++filt [-_|--strip-underscores] 2742 [-n|--no-strip-underscores] 2743 [-p|--no-params] 2744 [-t|--types] 2745 [-i|--no-verbose] 2746 [-s format|--format=format] 2747 [--help] [--version] [symbol...] 2748.Ed 2749.Pp 2750The C++ and Java languages provide function overloading, which means that 2751you can write many functions with the same name, providing that each function 2752takes parameters of different types. In order to be able to distinguish these 2753similarly named functions C++ and Java encode them into a low-level assembler 2754name which uniquely identifies each different version. This process is known 2755as 2756.Em mangling . 2757The 2758.Xr c++filt 2759program does the inverse mapping: it decodes ( 2760.Em demangles ) 2761low-level names into user-level names so that they can be read. 2762.Pp 2763Every alphanumeric word (consisting of letters, digits, underscores, dollars, 2764or periods) seen in the input is a potential mangled name. If the name decodes 2765into a C++ name, the C++ name replaces the low-level name in the output, otherwise 2766the original word is output. In this way you can pass an entire assembler 2767source file, containing mangled names, through 2768.Xr c++filt 2769and see the same source file containing demangled names. 2770.Pp 2771You can also use 2772.Xr c++filt 2773to decipher individual symbols by passing them on the command line: 2774.Pp 2775.Bd -literal -offset indent 2776c++filt symbol 2777.Ed 2778.Pp 2779If no 2780.Va symbol 2781arguments are given, 2782.Xr c++filt 2783reads symbol names from the standard input instead. All the results are printed 2784on the standard output. The difference between reading names from the command 2785line versus reading names from the standard input is that command line arguments 2786are expected to be just mangled names and no checking is performed to separate 2787them from surrounding text. Thus for example: 2788.Pp 2789.Bd -literal -offset indent 2790c++filt -n _Z1fv 2791.Ed 2792.Pp 2793will work and demangle the name to \(lqf()\(rq whereas: 2794.Pp 2795.Bd -literal -offset indent 2796c++filt -n _Z1fv, 2797.Ed 2798.Pp 2799will not work. (Note the extra comma at the end of the mangled name which 2800makes it invalid). This command however will work: 2801.Pp 2802.Bd -literal -offset indent 2803echo _Z1fv, | c++filt -n 2804.Ed 2805.Pp 2806and will display \(lqf(),\(rq ie the demangled name followed by a trailing comma. 2807This behaviour is because when the names are read from the standard input 2808it is expected that they might be part of an assembler source file where there 2809might be extra, extraneous characters trailing after a mangled name. eg: 2810.Pp 2811.Bd -literal -offset indent 2812 .type _Z1fv, @function 2813.Ed 2814.Pp 2815.Bl -tag -width Ds 2816.It -_ 2817.It --strip-underscores 2818On some systems, both the C and C++ compilers put an underscore in front of 2819every name. For example, the C name 2820.Li foo 2821gets the low-level name 2822.Li _foo . 2823This option removes the initial underscore. Whether 2824.Xr c++filt 2825removes the underscore by default is target dependent. 2826.Pp 2827.It -j 2828.It --java 2829Prints demangled names using Java syntax. The default is to use C++ syntax. 2830.Pp 2831.It -n 2832.It --no-strip-underscores 2833Do not remove the initial underscore. 2834.Pp 2835.It -p 2836.It --no-params 2837When demangling the name of a function, do not display the types of the function's 2838parameters. 2839.Pp 2840.It -t 2841.It --types 2842Attempt to demangle types as well as function names. This is disabled by default 2843since mangled types are normally only used internally in the compiler, and 2844they can be confused with non-mangled names. eg a function called \(lqa\(rq treated 2845as a mangled type name would be demangled to \(lqsigned char\(rq. 2846.Pp 2847.It -i 2848.It --no-verbose 2849Do not include implementation details (if any) in the demangled output. 2850.Pp 2851.It -s Va format 2852.It --format= Va format 2853.Xr c++filt 2854can decode various methods of mangling, used by different compilers. The argument 2855to this option selects which method it uses: 2856.Pp 2857.Bl -tag -width Ds 2858.It auto 2859Automatic selection based on executable (the default method) 2860.It GNU 2861the one used by the GNU C++ compiler (g++) 2862.It lucid 2863the one used by the Lucid compiler (lcc) 2864.It arm 2865the one specified by the C++ Annotated Reference Manual 2866.It hp 2867the one used by the HP compiler (aCC) 2868.It edg 2869the one used by the EDG compiler 2870.It GNU-v3 2871the one used by the GNU C++ compiler (g++) with the V3 ABI. 2872.It java 2873the one used by the GNU Java compiler (gcj) 2874.It gnat 2875the one used by the GNU Ada compiler (GNAT). 2876.El 2877.Pp 2878.It --help 2879Print a summary of the options to 2880.Xr c++filt 2881and exit. 2882.Pp 2883.It --version 2884Print the version number of 2885.Xr c++filt 2886and exit. 2887.El 2888.Pp 2889.Qo 2890.Em Warning: 2891.Xr c++filt 2892is a new utility, and the details of its user interface are subject to change 2893in future releases. In particular, a command-line option may be required in 2894the future to decode a name passed as an argument on the command line; in 2895other words, 2896.Pp 2897.Bd -literal -offset indent 2898c++filt symbol 2899.Ed 2900.Pp 2901may in a future release become 2902.Pp 2903.Bd -literal -offset indent 2904c++filt option symbol 2905.Ed 2906.Qc 2907.Pp 2908.Sh addr2line 2909.Bd -literal -offset indent 2910addr2line [-b bfdname|--target=bfdname] 2911 [-C|--demangle[=style]] 2912 [-e filename|--exe=filename] 2913 [-f|--functions] [-s|--basename] 2914 [-i|--inlines] 2915 [-j|--section=name] 2916 [-H|--help] [-V|--version] 2917 [addr addr ...] 2918.Ed 2919.Pp 2920.Xr addr2line 2921translates addresses into file names and line numbers. Given an address in 2922an executable or an offset in a section of a relocatable object, it uses the 2923debugging information to figure out which file name and line number are associated 2924with it. 2925.Pp 2926The executable or relocatable object to use is specified with the 2927.Op -e 2928option. The default is the file 2929.Pa a.out . 2930The section in the relocatable object to use is specified with the 2931.Op -j 2932option. 2933.Pp 2934.Xr addr2line 2935has two modes of operation. 2936.Pp 2937In the first, hexadecimal addresses are specified on the command line, and 2938.Xr addr2line 2939displays the file name and line number for each address. 2940.Pp 2941In the second, 2942.Xr addr2line 2943reads hexadecimal addresses from standard input, and prints the file name 2944and line number for each address on standard output. In this mode, 2945.Xr addr2line 2946may be used in a pipe to convert dynamically chosen addresses. 2947.Pp 2948The format of the output is 2949.Li FILENAME:LINENO . 2950The file name and line number for each address is printed on a separate line. 2951If the 2952.Xr -f 2953option is used, then each 2954.Li FILENAME:LINENO 2955line is preceded by a 2956.Li FUNCTIONNAME 2957line which is the name of the function containing the address. 2958.Pp 2959If the file name or function name can not be determined, 2960.Xr addr2line 2961will print two question marks in their place. If the line number can not be 2962determined, 2963.Xr addr2line 2964will print 0. 2965.Pp 2966The long and short forms of options, shown here as alternatives, are equivalent. 2967.Pp 2968.Bl -tag -width Ds 2969.It -b Va bfdname 2970.It --target= Va bfdname 2971Specify that the object-code format for the object files is 2972.Va bfdname . 2973.Pp 2974.It -C 2975.It --demangle[= Va style] 2976Decode ( 2977.Em demangle ) 2978low-level symbol names into user-level names. Besides removing any initial 2979underscore prepended by the system, this makes C++ function names readable. 2980Different compilers have different mangling styles. The optional demangling 2981style argument can be used to choose an appropriate demangling style for your 2982compiler.See Section 2983.Dq c++filt , 2984for more information on demangling. 2985.Pp 2986.It -e Va filename 2987.It --exe= Va filename 2988Specify the name of the executable for which addresses should be translated. 2989The default file is 2990.Pa a.out . 2991.Pp 2992.It -f 2993.It --functions 2994Display function names as well as file and line number information. 2995.Pp 2996.It -s 2997.It --basenames 2998Display only the base of each file name. 2999.Pp 3000.It -i 3001.It --inlines 3002If the address belongs to a function that was inlined, the source information 3003for all enclosing scopes back to the first non-inlined function will also 3004be printed. For example, if 3005.Li main 3006inlines 3007.Li callee1 3008which inlines 3009.Li callee2 , 3010and address is from 3011.Li callee2 , 3012the source information for 3013.Li callee1 3014and 3015.Li main 3016will also be printed. 3017.Pp 3018.It -j 3019.It --section 3020Read offsets relative to the specified section instead of absolute addresses. 3021.El 3022.Pp 3023.Sh nlmconv 3024.Xr nlmconv 3025converts a relocatable object file into a NetWare Loadable Module. 3026.Pp 3027.Qo 3028.Em Warning: 3029.Xr nlmconv 3030is not always built as part of the binary utilities, since it is only useful 3031for NLM targets. 3032.Qc 3033.Pp 3034.Bd -literal -offset indent 3035nlmconv [-I bfdname|--input-target=bfdname] 3036 [-O bfdname|--output-target=bfdname] 3037 [-T headerfile|--header-file=headerfile] 3038 [-d|--debug] [-l linker|--linker=linker] 3039 [-h|--help] [-V|--version] 3040 infile outfile 3041.Ed 3042.Pp 3043.Xr nlmconv 3044converts the relocatable 3045.Li i386 3046object file 3047.Va infile 3048into the NetWare Loadable Module 3049.Va outfile , 3050optionally reading 3051.Va headerfile 3052for NLM header information. For instructions on writing the NLM command file 3053language used in header files, see the 3054.Li linkers 3055section, 3056.Li NLMLINK 3057in particular, of the 3058.Em NLM Development and Tools Overview , 3059which is part of the NLM Software Developer's Kit (\(lqNLM SDK\(rq), available from 3060Novell, Inc. 3061.Xr nlmconv 3062uses the GNU Binary File Descriptor library to read 3063.Va infile ; 3064see BFD,,BFD,ld.info,Using LD, for more information. 3065.Pp 3066.Xr nlmconv 3067can perform a link step. In other words, you can list more than one object 3068file for input if you list them in the definitions file (rather than simply 3069specifying one input file on the command line). In this case, 3070.Xr nlmconv 3071calls the linker for you. 3072.Pp 3073.Bl -tag -width Ds 3074.It -I Va bfdname 3075.It --input-target= Va bfdname 3076Object format of the input file. 3077.Xr nlmconv 3078can usually determine the format of a given file (so no default is necessary).See Section 3079.Dq Target Selection , 3080for more information. 3081.Pp 3082.It -O Va bfdname 3083.It --output-target= Va bfdname 3084Object format of the output file. 3085.Xr nlmconv 3086infers the output format based on the input format, e.g. for a 3087.Li i386 3088input file the output format is 3089.Li nlm32-i386 . 3090See Section.Dq Target Selection , 3091for more information. 3092.Pp 3093.It -T Va headerfile 3094.It --header-file= Va headerfile 3095Reads 3096.Va headerfile 3097for NLM header information. For instructions on writing the NLM command file 3098language used in header files, see see the 3099.Li linkers 3100section, of the 3101.Em NLM Development and Tools Overview , 3102which is part of the NLM Software Developer's Kit, available from Novell, 3103Inc. 3104.Pp 3105.It -d 3106.It --debug 3107Displays (on standard error) the linker command line used by 3108.Xr nlmconv . 3109.Pp 3110.It -l Va linker 3111.It --linker= Va linker 3112Use 3113.Va linker 3114for any linking. 3115.Va linker 3116can be an absolute or a relative pathname. 3117.Pp 3118.It -h 3119.It --help 3120Prints a usage summary. 3121.Pp 3122.It -V 3123.It --version 3124Prints the version number for 3125.Xr nlmconv . 3126.El 3127.Pp 3128.Sh windmc 3129.Xr windmc 3130may be used to generator Windows message resources. 3131.Pp 3132.Qo 3133.Em Warning: 3134.Xr windmc 3135is not always built as part of the binary utilities, since it is only useful 3136for Windows targets. 3137.Qc 3138.Pp 3139.Bd -literal -offset indent 3140windmc [options] input-file 3141.Ed 3142.Pp 3143.Xr windmc 3144reads message definitions from an input file (.mc) and translate them into 3145a set of output files. The output files may be of four kinds: 3146.Pp 3147.Bl -tag -width Ds 3148.It h 3149A C header file containing the message definitions. 3150.Pp 3151.It rc 3152A resource file compilable by the 3153.Xr windres 3154tool. 3155.Pp 3156.It bin 3157One or more binary files containing the resource data for a specific message 3158language. 3159.Pp 3160.It dbg 3161A C include file that maps message id's to their symbolic name. 3162.El 3163.Pp 3164The exact description of these different formats is available in documentation 3165from Microsoft. 3166.Pp 3167When 3168.Xr windmc 3169converts from the 3170.Li mc 3171format to the 3172.Li bin 3173format, 3174.Li rc , 3175.Li h , 3176and optional 3177.Li dbg 3178it is acting like the Windows Message Compiler. 3179.Pp 3180.Bl -tag -width Ds 3181.It -a 3182.It --ascii_in 3183Specifies that the input file specified is ANSI. This is the default behaviour. 3184.Pp 3185.It -A 3186.It --ascii_out 3187Specifies that messages in the output 3188.Li bin 3189files should be in ANSI format. 3190.Pp 3191.It -b 3192.It --binprefix 3193Specifies that 3194.Li bin 3195filenames should have to be prefixed by the basename of the source file. 3196.Pp 3197.It -c 3198.It --customflag 3199Sets the customer bit in all message id's. 3200.Pp 3201.It -C Va codepage 3202.It --codepage_in Va codepage 3203Sets the default codepage to be used to convert input file to UTF16. The default 3204is ocdepage 1252. 3205.Pp 3206.It -d 3207.It --decimal_values 3208Outputs the constants in the header file in decimal. Default is using hexadecimal 3209output. 3210.Pp 3211.It -e Va ext 3212.It --extension Va ext 3213The extension for the header file. The default is .h extension. 3214.Pp 3215.It -F Va target 3216.It --target Va target 3217Specify the BFD format to use for a bin file as output. This is a BFD target 3218name; you can use the 3219.Op --help 3220option to see a list of supported targets. Normally 3221.Xr windmc 3222will use the default format, which is the first one listed by the 3223.Op --help 3224option. Target Selection. 3225.Pp 3226.It -h Va path 3227.It --headerdir Va path 3228The target directory of the generated header file. The default is the current 3229directory. 3230.Pp 3231.It -H 3232.It --help 3233Displays a list of command line options and then exits. 3234.Pp 3235.It -m Va characters 3236.It --maxlength Va characters 3237Instructs 3238.Xr windmc 3239to generate a warning if the length of any message exceeds the number specified. 3240.Pp 3241.It -n 3242.It --nullterminate 3243Terminate message text in 3244.Li bin 3245files by zero. By default they are terminated by CR/LF. 3246.Pp 3247.It -o 3248.It --hresult_use 3249Not yet implemented. Instructs 3250.Li windmc 3251to generate an OLE2 header file, using HRESULT definitions. Status codes are 3252used if the flag is not specified. 3253.Pp 3254.It -O Va codepage 3255.It --codepage_out Va codepage 3256Sets the default codepage to be used to output text files. The default is 3257ocdepage 1252. 3258.Pp 3259.It -r Va path 3260.It --rcdir Va path 3261The target directory for the generated 3262.Li rc 3263script and the generated 3264.Li bin 3265files that the resource compiler script includes. The default is the current 3266directory. 3267.Pp 3268.It -u 3269.It --unicode_in 3270Specifies that the input file is UTF16. 3271.Pp 3272.It -U 3273.It --unicode_out 3274Specifies that messages in the output 3275.Li bin 3276file should be in UTF16 format. This is the default behaviour. 3277.Pp 3278.It -v 3279.It --verbose 3280Enable verbose mode. This tells you what the preprocessor is if you didn't 3281specify one. 3282.Pp 3283.It -V 3284.It --version 3285Prints the version number for 3286.Xr windres . 3287.Pp 3288.It -x Va path 3289.It --xdgb Va path 3290The path of the 3291.Li dbg 3292C include file that maps message id's to the symbolic name. No such file is 3293generated without specifying the switch. 3294.El 3295.Pp 3296.Sh windres 3297.Xr windres 3298may be used to manipulate Windows resources. 3299.Pp 3300.Qo 3301.Em Warning: 3302.Xr windres 3303is not always built as part of the binary utilities, since it is only useful 3304for Windows targets. 3305.Qc 3306.Pp 3307.Bd -literal -offset indent 3308windres [options] [input-file] [output-file] 3309.Ed 3310.Pp 3311.Xr windres 3312reads resources from an input file and copies them into an output file. Either 3313file may be in one of three formats: 3314.Pp 3315.Bl -tag -width Ds 3316.It rc 3317A text format read by the Resource Compiler. 3318.Pp 3319.It res 3320A binary format generated by the Resource Compiler. 3321.Pp 3322.It coff 3323A COFF object or executable. 3324.El 3325.Pp 3326The exact description of these different formats is available in documentation 3327from Microsoft. 3328.Pp 3329When 3330.Xr windres 3331converts from the 3332.Li rc 3333format to the 3334.Li res 3335format, it is acting like the Windows Resource Compiler. When 3336.Xr windres 3337converts from the 3338.Li res 3339format to the 3340.Li coff 3341format, it is acting like the Windows 3342.Li CVTRES 3343program. 3344.Pp 3345When 3346.Xr windres 3347generates an 3348.Li rc 3349file, the output is similar but not identical to the format expected for the 3350input. When an input 3351.Li rc 3352file refers to an external filename, an output 3353.Li rc 3354file will instead include the file contents. 3355.Pp 3356If the input or output format is not specified, 3357.Xr windres 3358will guess based on the file name, or, for the input file, the file contents. 3359A file with an extension of 3360.Pa .rc 3361will be treated as an 3362.Li rc 3363file, a file with an extension of 3364.Pa .res 3365will be treated as a 3366.Li res 3367file, and a file with an extension of 3368.Pa .o 3369or 3370.Pa .exe 3371will be treated as a 3372.Li coff 3373file. 3374.Pp 3375If no output file is specified, 3376.Xr windres 3377will print the resources in 3378.Li rc 3379format to standard output. 3380.Pp 3381The normal use is for you to write an 3382.Li rc 3383file, use 3384.Xr windres 3385to convert it to a COFF object file, and then link the COFF file into your 3386application. This will make the resources described in the 3387.Li rc 3388file available to Windows. 3389.Pp 3390.Bl -tag -width Ds 3391.It -i Va filename 3392.It --input Va filename 3393The name of the input file. If this option is not used, then 3394.Xr windres 3395will use the first non-option argument as the input file name. If there are 3396no non-option arguments, then 3397.Xr windres 3398will read from standard input. 3399.Xr windres 3400can not read a COFF file from standard input. 3401.Pp 3402.It -o Va filename 3403.It --output Va filename 3404The name of the output file. If this option is not used, then 3405.Xr windres 3406will use the first non-option argument, after any used for the input file 3407name, as the output file name. If there is no non-option argument, then 3408.Xr windres 3409will write to standard output. 3410.Xr windres 3411can not write a COFF file to standard output. Note, for compatibility with 3412.Xr rc 3413the option 3414.Op -fo 3415is also accepted, but its use is not recommended. 3416.Pp 3417.It -J Va format 3418.It --input-format Va format 3419The input format to read. 3420.Va format 3421may be 3422.Li res , 3423.Li rc , 3424or 3425.Li coff . 3426If no input format is specified, 3427.Xr windres 3428will guess, as described above. 3429.Pp 3430.It -O Va format 3431.It --output-format Va format 3432The output format to generate. 3433.Va format 3434may be 3435.Li res , 3436.Li rc , 3437or 3438.Li coff . 3439If no output format is specified, 3440.Xr windres 3441will guess, as described above. 3442.Pp 3443.It -F Va target 3444.It --target Va target 3445Specify the BFD format to use for a COFF file as input or output. This is 3446a BFD target name; you can use the 3447.Op --help 3448option to see a list of supported targets. Normally 3449.Xr windres 3450will use the default format, which is the first one listed by the 3451.Op --help 3452option. Target Selection. 3453.Pp 3454.It --preprocessor Va program 3455When 3456.Xr windres 3457reads an 3458.Li rc 3459file, it runs it through the C preprocessor first. This option may be used 3460to specify the preprocessor to use, including any leading arguments. The default 3461preprocessor argument is 3462.Li gcc -E -xc-header -DRC_INVOKED . 3463.Pp 3464.It -I Va directory 3465.It --include-dir Va directory 3466Specify an include directory to use when reading an 3467.Li rc 3468file. 3469.Xr windres 3470will pass this to the preprocessor as an 3471.Op -I 3472option. 3473.Xr windres 3474will also search this directory when looking for files named in the 3475.Li rc 3476file. If the argument passed to this command matches any of the supported 3477.Va formats 3478(as described in the 3479.Op -J 3480option), it will issue a deprecation warning, and behave just like the 3481.Op -J 3482option. New programs should not use this behaviour. If a directory happens 3483to match a 3484.Va format , 3485simple prefix it with 3486.Li ./ 3487to disable the backward compatibility. 3488.Pp 3489.It -D Va target 3490.It --define Va sym[= Va val] 3491Specify a 3492.Op -D 3493option to pass to the preprocessor when reading an 3494.Li rc 3495file. 3496.Pp 3497.It -U Va target 3498.It --undefine Va sym 3499Specify a 3500.Op -U 3501option to pass to the preprocessor when reading an 3502.Li rc 3503file. 3504.Pp 3505.It -r 3506Ignored for compatibility with rc. 3507.Pp 3508.It -v 3509Enable verbose mode. This tells you what the preprocessor is if you didn't 3510specify one. 3511.Pp 3512.It -c Va val 3513.It --codepage Va val 3514Specify the default codepage to use when reading an 3515.Li rc 3516file. 3517.Va val 3518should be a hexadecimal prefixed by 3519.Li 0x 3520or decimal codepage code. The valid range is from zero up to 0xffff, but the 3521validity of the codepage is host and configuration dependent. 3522.Pp 3523.It -l Va val 3524.It --language Va val 3525Specify the default language to use when reading an 3526.Li rc 3527file. 3528.Va val 3529should be a hexadecimal language code. The low eight bits are the language, 3530and the high eight bits are the sublanguage. 3531.Pp 3532.It --use-temp-file 3533Use a temporary file to instead of using popen to read the output of the preprocessor. 3534Use this option if the popen implementation is buggy on the host (eg., certain 3535non-English language versions of Windows 95 and Windows 98 are known to have 3536buggy popen where the output will instead go the console). 3537.Pp 3538.It --no-use-temp-file 3539Use popen, not a temporary file, to read the output of the preprocessor. This 3540is the default behaviour. 3541.Pp 3542.It -h 3543.It --help 3544Prints a usage summary. 3545.Pp 3546.It -V 3547.It --version 3548Prints the version number for 3549.Xr windres . 3550.Pp 3551.It --yydebug 3552If 3553.Xr windres 3554is compiled with 3555.Li YYDEBUG 3556defined as 3557.Li 1 , 3558this will turn on parser debugging. 3559.El 3560.Pp 3561.Sh dlltool 3562.Xr dlltool 3563is used to create the files needed to create dynamic link libraries (DLLs) 3564on systems which understand PE format image files such as Windows. A DLL contains 3565an export table which contains information that the runtime loader needs to 3566resolve references from a referencing program. 3567.Pp 3568The export table is generated by this program by reading in a 3569.Pa .def 3570file or scanning the 3571.Pa .a 3572and 3573.Pa .o 3574files which will be in the DLL. A 3575.Pa .o 3576file can contain information in special 3577.Li .drectve 3578sections with export information. 3579.Pp 3580.Qo 3581.Em Note: 3582.Xr dlltool 3583is not always built as part of the binary utilities, since it is only useful 3584for those targets which support DLLs. 3585.Qc 3586.Pp 3587.Bd -literal -offset indent 3588dlltool [-d|--input-def def-file-name] 3589 [-b|--base-file base-file-name] 3590 [-e|--output-exp exports-file-name] 3591 [-z|--output-def def-file-name] 3592 [-l|--output-lib library-file-name] 3593 [--export-all-symbols] [--no-export-all-symbols] 3594 [--exclude-symbols list] 3595 [--no-default-excludes] 3596 [-S|--as path-to-assembler] [-f|--as-flags options] 3597 [-D|--dllname name] [-m|--machine machine] 3598 [-a|--add-indirect] 3599 [-U|--add-underscore] [--add-stdcall-underscore] 3600 [-k|--kill-at] [-A|--add-stdcall-alias] 3601 [-p|--ext-prefix-alias prefix] 3602 [-x|--no-idata4] [-c|--no-idata5] [-i|--interwork] 3603 [-n|--nodelete] [-t|--temp-prefix prefix] 3604 [-v|--verbose] 3605 [-h|--help] [-V|--version] 3606 [object-file ...] 3607.Ed 3608.Pp 3609.Xr dlltool 3610reads its inputs, which can come from the 3611.Op -d 3612and 3613.Op -b 3614options as well as object files specified on the command line. It then processes 3615these inputs and if the 3616.Op -e 3617option has been specified it creates a exports file. If the 3618.Op -l 3619option has been specified it creates a library file and if the 3620.Op -z 3621option has been specified it creates a def file. Any or all of the 3622.Op -e , 3623.Op -l 3624and 3625.Op -z 3626options can be present in one invocation of dlltool. 3627.Pp 3628When creating a DLL, along with the source for the DLL, it is necessary to 3629have three other files. 3630.Xr dlltool 3631can help with the creation of these files. 3632.Pp 3633The first file is a 3634.Pa .def 3635file which specifies which functions are exported from the DLL, which functions 3636the DLL imports, and so on. This is a text file and can be created by hand, 3637or 3638.Xr dlltool 3639can be used to create it using the 3640.Op -z 3641option. In this case 3642.Xr dlltool 3643will scan the object files specified on its command line looking for those 3644functions which have been specially marked as being exported and put entries 3645for them in the 3646.Pa .def 3647file it creates. 3648.Pp 3649In order to mark a function as being exported from a DLL, it needs to have 3650an 3651.Op -export:<name_of_function> 3652entry in the 3653.Li .drectve 3654section of the object file. This can be done in C by using the asm() operator: 3655.Pp 3656.Bd -literal -offset indent 3657 asm (".section .drectve"); 3658 asm (".ascii \e"-export:my_func\e""); 3659 3660 int my_func (void) { ... } 3661.Ed 3662.Pp 3663The second file needed for DLL creation is an exports file. This file is linked 3664with the object files that make up the body of the DLL and it handles the 3665interface between the DLL and the outside world. This is a binary file and 3666it can be created by giving the 3667.Op -e 3668option to 3669.Xr dlltool 3670when it is creating or reading in a 3671.Pa .def 3672file. 3673.Pp 3674The third file needed for DLL creation is the library file that programs will 3675link with in order to access the functions in the DLL. This file can be created 3676by giving the 3677.Op -l 3678option to dlltool when it is creating or reading in a 3679.Pa .def 3680file. 3681.Pp 3682.Xr dlltool 3683builds the library file by hand, but it builds the exports file by creating 3684temporary files containing assembler statements and then assembling these. 3685The 3686.Op -S 3687command line option can be used to specify the path to the assembler that 3688dlltool will use, and the 3689.Op -f 3690option can be used to pass specific flags to that assembler. The 3691.Op -n 3692can be used to prevent dlltool from deleting these temporary assembler files 3693when it is done, and if 3694.Op -n 3695is specified twice then this will prevent dlltool from deleting the temporary 3696object files it used to build the library. 3697.Pp 3698Here is an example of creating a DLL from a source file 3699.Li dll.c 3700and also creating a program (from an object file called 3701.Li program.o ) 3702that uses that DLL: 3703.Pp 3704.Bd -literal -offset indent 3705 gcc -c dll.c 3706 dlltool -e exports.o -l dll.lib dll.o 3707 gcc dll.o exports.o -o dll.dll 3708 gcc program.o dll.lib -o program 3709.Ed 3710.Pp 3711The command line options have the following meanings: 3712.Pp 3713.Bl -tag -width Ds 3714.It -d Va filename 3715.It --input-def Va filename 3716Specifies the name of a 3717.Pa .def 3718file to be read in and processed. 3719.Pp 3720.It -b Va filename 3721.It --base-file Va filename 3722Specifies the name of a base file to be read in and processed. The contents 3723of this file will be added to the relocation section in the exports file generated 3724by dlltool. 3725.Pp 3726.It -e Va filename 3727.It --output-exp Va filename 3728Specifies the name of the export file to be created by dlltool. 3729.Pp 3730.It -z Va filename 3731.It --output-def Va filename 3732Specifies the name of the 3733.Pa .def 3734file to be created by dlltool. 3735.Pp 3736.It -l Va filename 3737.It --output-lib Va filename 3738Specifies the name of the library file to be created by dlltool. 3739.Pp 3740.It --export-all-symbols 3741Treat all global and weak defined symbols found in the input object files 3742as symbols to be exported. There is a small list of symbols which are not 3743exported by default; see the 3744.Op --no-default-excludes 3745option. You may add to the list of symbols to not export by using the 3746.Op --exclude-symbols 3747option. 3748.Pp 3749.It --no-export-all-symbols 3750Only export symbols explicitly listed in an input 3751.Pa .def 3752file or in 3753.Li .drectve 3754sections in the input object files. This is the default behaviour. The 3755.Li .drectve 3756sections are created by 3757.Li dllexport 3758attributes in the source code. 3759.Pp 3760.It --exclude-symbols Va list 3761Do not export the symbols in 3762.Va list . 3763This is a list of symbol names separated by comma or colon characters. The 3764symbol names should not contain a leading underscore. This is only meaningful 3765when 3766.Op --export-all-symbols 3767is used. 3768.Pp 3769.It --no-default-excludes 3770When 3771.Op --export-all-symbols 3772is used, it will by default avoid exporting certain special symbols. The current 3773list of symbols to avoid exporting is 3774.Li DllMain@12 , 3775.Li DllEntryPoint@0 , 3776.Li impure_ptr . 3777You may use the 3778.Op --no-default-excludes 3779option to go ahead and export these special symbols. This is only meaningful 3780when 3781.Op --export-all-symbols 3782is used. 3783.Pp 3784.It -S Va path 3785.It --as Va path 3786Specifies the path, including the filename, of the assembler to be used to 3787create the exports file. 3788.Pp 3789.It -f Va options 3790.It --as-flags Va options 3791Specifies any specific command line options to be passed to the assembler 3792when building the exports file. This option will work even if the 3793.Op -S 3794option is not used. This option only takes one argument, and if it occurs 3795more than once on the command line, then later occurrences will override earlier 3796occurrences. So if it is necessary to pass multiple options to the assembler 3797they should be enclosed in double quotes. 3798.Pp 3799.It -D Va name 3800.It --dll-name Va name 3801Specifies the name to be stored in the 3802.Pa .def 3803file as the name of the DLL when the 3804.Op -e 3805option is used. If this option is not present, then the filename given to 3806the 3807.Op -e 3808option will be used as the name of the DLL. 3809.Pp 3810.It -m Va machine 3811.It -machine Va machine 3812Specifies the type of machine for which the library file should be built. 3813.Xr dlltool 3814has a built in default type, depending upon how it was created, but this option 3815can be used to override that. This is normally only useful when creating DLLs 3816for an ARM processor, when the contents of the DLL are actually encode using 3817Thumb instructions. 3818.Pp 3819.It -a 3820.It --add-indirect 3821Specifies that when 3822.Xr dlltool 3823is creating the exports file it should add a section which allows the exported 3824functions to be referenced without using the import library. Whatever the 3825hell that means! 3826.Pp 3827.It -U 3828.It --add-underscore 3829Specifies that when 3830.Xr dlltool 3831is creating the exports file it should prepend an underscore to the names 3832of 3833.Em all 3834exported symbols. 3835.Pp 3836.It --add-stdcall-underscore 3837Specifies that when 3838.Xr dlltool 3839is creating the exports file it should prepend an underscore to the names 3840of exported 3841.Em stdcall 3842functions. Variable names and non-stdcall function names are not modified. 3843This option is useful when creating GNU-compatible import libs for third party 3844DLLs that were built with MS-Windows tools. 3845.Pp 3846.It -k 3847.It --kill-at 3848Specifies that when 3849.Xr dlltool 3850is creating the exports file it should not append the string 3851.Li @ <number> . 3852These numbers are called ordinal numbers and they represent another way of 3853accessing the function in a DLL, other than by name. 3854.Pp 3855.It -A 3856.It --add-stdcall-alias 3857Specifies that when 3858.Xr dlltool 3859is creating the exports file it should add aliases for stdcall symbols without 3860.Li @ <number> 3861in addition to the symbols with 3862.Li @ <number> . 3863.Pp 3864.It -p 3865.It --ext-prefix-alias Va prefix 3866Causes 3867.Xr dlltool 3868to create external aliases for all DLL imports with the specified prefix. 3869The aliases are created for both external and import symbols with no leading 3870underscore. 3871.Pp 3872.It -x 3873.It --no-idata4 3874Specifies that when 3875.Xr dlltool 3876is creating the exports and library files it should omit the 3877.Li .idata4 3878section. This is for compatibility with certain operating systems. 3879.Pp 3880.It -c 3881.It --no-idata5 3882Specifies that when 3883.Xr dlltool 3884is creating the exports and library files it should omit the 3885.Li .idata5 3886section. This is for compatibility with certain operating systems. 3887.Pp 3888.It -i 3889.It --interwork 3890Specifies that 3891.Xr dlltool 3892should mark the objects in the library file and exports file that it produces 3893as supporting interworking between ARM and Thumb code. 3894.Pp 3895.It -n 3896.It --nodelete 3897Makes 3898.Xr dlltool 3899preserve the temporary assembler files it used to create the exports file. 3900If this option is repeated then dlltool will also preserve the temporary object 3901files it uses to create the library file. 3902.Pp 3903.It -t Va prefix 3904.It --temp-prefix Va prefix 3905Makes 3906.Xr dlltool 3907use 3908.Va prefix 3909when constructing the names of temporary assembler and object files. By default, 3910the temp file prefix is generated from the pid. 3911.Pp 3912.It -v 3913.It --verbose 3914Make dlltool describe what it is doing. 3915.Pp 3916.It -h 3917.It --help 3918Displays a list of command line options and then exits. 3919.Pp 3920.It -V 3921.It --version 3922Displays dlltool's version number and then exits. 3923.Pp 3924.El 3925.Ss The format of the Xr dlltool Pa .def file 3926A 3927.Pa .def 3928file contains any number of the following commands: 3929.Pp 3930.Bl -tag -width Ds 3931.It Li NAME Va name Li [ , Va base Li ] 3932The result is going to be named 3933.Va name 3934.Li .exe . 3935.Pp 3936.It Li LIBRARY Va name Li [ , Va base Li ] 3937The result is going to be named 3938.Va name 3939.Li .dll . 3940.Pp 3941.It Li EXPORTS ( ( ( Va name1 Li [ = Va name2 Li ] ) | ( Va name1 Li = Va module-name Li . Va external-name Li ) ) 3942.It Li [ Va integer Li ] [ NONAME ] [ CONSTANT ] [ DATA ] [ PRIVATE ] ) * 3943Declares 3944.Va name1 3945as an exported symbol from the DLL, with optional ordinal number 3946.Va integer , 3947or declares 3948.Va name1 3949as an alias (forward) of the function 3950.Va external-name 3951in the DLL 3952.Va module-name . 3953.Pp 3954.It Li IMPORTS ( ( Va internal-name Li = Va module-name Li . Va integer Li ) | [ Va internal-name Li = ] Va module-name Li . Va external-name Li ) ) * 3955Declares that 3956.Va external-name 3957or the exported function whose ordinal number is 3958.Va integer 3959is to be imported from the file 3960.Va module-name . 3961If 3962.Va internal-name 3963is specified then this is the name that the imported function will be referred 3964to in the body of the DLL. 3965.Pp 3966.It Li DESCRIPTION Va string 3967Puts 3968.Va string 3969into the output 3970.Pa .exp 3971file in the 3972.Li .rdata 3973section. 3974.Pp 3975.It Li STACKSIZE Va number-reserve Li [, Va number-commit Li ] 3976.It Li HEAPSIZE Va number-reserve Li [, Va number-commit Li ] 3977Generates 3978.Li --stack 3979or 3980.Li --heap 3981.Va number-reserve 3982, 3983.Va number-commit 3984in the output 3985.Li .drectve 3986section. The linker will see this and act upon it. 3987.Pp 3988.It Li CODE Va attr Li + 3989.It Li DATA Va attr Li + 3990.It Li SECTIONS ( Va section-name Va attr Li + ) * 3991Generates 3992.Li --attr 3993.Va section-name 3994.Va attr 3995in the output 3996.Li .drectve 3997section, where 3998.Va attr 3999is one of 4000.Li READ , 4001.Li WRITE , 4002.Li EXECUTE 4003or 4004.Li SHARED . 4005The linker will see this and act upon it. 4006.Pp 4007.El 4008.Sh readelf 4009.Bd -literal -offset indent 4010readelf [-a|--all] 4011 [-h|--file-header] 4012 [-l|--program-headers|--segments] 4013 [-S|--section-headers|--sections] 4014 [-g|--section-groups] 4015 [-t|--section-details] 4016 [-e|--headers] 4017 [-s|--syms|--symbols] 4018 [-n|--notes] 4019 [-r|--relocs] 4020 [-u|--unwind] 4021 [-d|--dynamic] 4022 [-V|--version-info] 4023 [-A|--arch-specific] 4024 [-D|--use-dynamic] 4025 [-x <number or name>|--hex-dump=<number or name>] 4026 [-w[liaprmfFsoR]| 4027 --debug-dump[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]] 4028 [-I|-histogram] 4029 [-v|--version] 4030 [-W|--wide] 4031 [-H|--help] 4032 elffile... 4033.Ed 4034.Pp 4035.Xr readelf 4036displays information about one or more ELF format object files. The options 4037control what particular information to display. 4038.Pp 4039.Va elffile 4040\&...are the object files to be examined. 32-bit and 64-bit ELF files are supported, 4041as are archives containing ELF files. 4042.Pp 4043This program performs a similar function to 4044.Xr objdump 4045but it goes into more detail and it exists independently of the bfd library, 4046so if there is a bug in bfd then readelf will not be affected. 4047.Pp 4048The long and short forms of options, shown here as alternatives, are equivalent. 4049At least one option besides 4050.Li -v 4051or 4052.Li -H 4053must be given. 4054.Pp 4055.Bl -tag -width Ds 4056.It -a 4057.It --all 4058Equivalent to specifying 4059.Op --file-header , 4060.Op --program-headers , 4061.Op --sections , 4062.Op --symbols , 4063.Op --relocs , 4064.Op --dynamic , 4065.Op --notes 4066and 4067.Op --version-info . 4068.Pp 4069.It -h 4070.It --file-header 4071Displays the information contained in the ELF header at the start of the file. 4072.Pp 4073.It -l 4074.It --program-headers 4075.It --segments 4076Displays the information contained in the file's segment headers, if it has 4077any. 4078.Pp 4079.It -S 4080.It --sections 4081.It --section-headers 4082Displays the information contained in the file's section headers, if it has 4083any. 4084.Pp 4085.It -g 4086.It --section-groups 4087Displays the information contained in the file's section groups, if it has 4088any. 4089.Pp 4090.It -t 4091.It --section-details 4092Displays the detailed section information. Implies 4093.Op -S . 4094.Pp 4095.It -s 4096.It --symbols 4097.It --syms 4098Displays the entries in symbol table section of the file, if it has one. 4099.Pp 4100.It -e 4101.It --headers 4102Display all the headers in the file. Equivalent to 4103.Op -h -l -S . 4104.Pp 4105.It -n 4106.It --notes 4107Displays the contents of the NOTE segments and/or sections, if any. 4108.Pp 4109.It -r 4110.It --relocs 4111Displays the contents of the file's relocation section, if it has one. 4112.Pp 4113.It -u 4114.It --unwind 4115Displays the contents of the file's unwind section, if it has one. Only the 4116unwind sections for IA64 ELF files are currently supported. 4117.Pp 4118.It -d 4119.It --dynamic 4120Displays the contents of the file's dynamic section, if it has one. 4121.Pp 4122.It -V 4123.It --version-info 4124Displays the contents of the version sections in the file, it they exist. 4125.Pp 4126.It -A 4127.It --arch-specific 4128Displays architecture-specific information in the file, if there is any. 4129.Pp 4130.It -D 4131.It --use-dynamic 4132When displaying symbols, this option makes 4133.Xr readelf 4134use the symbol table in the file's dynamic section, rather than the one in 4135the symbols section. 4136.Pp 4137.It -x <number or name> 4138.It --hex-dump=<number or name> 4139Displays the contents of the indicated section as a hexadecimal dump. A number 4140identifies a particular section by index in the section table; any other string 4141identifies all sections with that name in the object file. 4142.Pp 4143.It -w[liaprmfFsoR] 4144.It --debug-dump[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges] 4145Displays the contents of the debug sections in the file, if any are present. 4146If one of the optional letters or words follows the switch then only data 4147found in those specific sections will be dumped. 4148.Pp 4149.It -I 4150.It --histogram 4151Display a histogram of bucket list lengths when displaying the contents of 4152the symbol tables. 4153.Pp 4154.It -v 4155.It --version 4156Display the version number of readelf. 4157.Pp 4158.It -W 4159.It --wide 4160Don't break output lines to fit into 80 columns. By default 4161.Xr readelf 4162breaks section header and segment listing lines for 64-bit ELF files, so that 4163they fit into 80 columns. This option causes 4164.Xr readelf 4165to print each section header resp. each segment one a single line, which is 4166far more readable on terminals wider than 80 columns. 4167.Pp 4168.It -H 4169.It --help 4170Display the command line options understood by 4171.Xr readelf . 4172.Pp 4173.El 4174.Sh Common Options 4175The following command-line options are supported by all of the programs described 4176in this manual. 4177.Pp 4178.Bl -tag -width Ds 4179.It @ Va file 4180Read command-line options from 4181.Va file . 4182The options read are inserted in place of the original @ 4183.Va file 4184option. If 4185.Va file 4186does not exist, or cannot be read, then the option will be treated literally, 4187and not removed. 4188.Pp 4189Options in 4190.Va file 4191are separated by whitespace. A whitespace character may be included in an 4192option by surrounding the entire option in either single or double quotes. 4193Any character (including a backslash) may be included by prefixing the character 4194to be included with a backslash. The 4195.Va file 4196may itself contain additional @ 4197.Va file 4198options; any such options will be processed recursively. 4199.Pp 4200.It --help 4201Display the command-line options supported by the program. 4202.Pp 4203.It --version 4204Display the version number of the program. 4205.Pp 4206.El 4207.Sh Selecting the Target System 4208You can specify two aspects of the target system to the GNU binary file utilities, 4209each in several ways: 4210.Pp 4211.Bl -bullet 4212.It 4213the target 4214.Pp 4215.It 4216the architecture 4217.El 4218.Pp 4219In the following summaries, the lists of ways to specify values are in order 4220of decreasing precedence. The ways listed first override those listed later. 4221.Pp 4222The commands to list valid values only list the values for which the programs 4223you are running were configured. If they were configured with 4224.Op --enable-targets=all , 4225the commands list most of the available values, but a few are left out; not 4226all targets can be configured in at once because some of them can only be 4227configured 4228.Em native 4229(on hosts with the same type as the target system). 4230.Pp 4231.Ss Target Selection 4232A 4233.Em target 4234is an object file format. A given target may be supported for multiple architectures 4235(see Section 4236.Dq Architecture Selection ) . 4237A target selection may also have variations for different operating systems 4238or architectures. 4239.Pp 4240The command to list valid target values is 4241.Li objdump -i 4242(the first column of output contains the relevant information). 4243.Pp 4244Some sample values are: 4245.Li a.out-hp300bsd , 4246.Li ecoff-littlemips , 4247.Li a.out-sunos-big . 4248.Pp 4249You can also specify a target using a configuration triplet. This is the same 4250sort of name that is passed to 4251.Pa configure 4252to specify a target. When you use a configuration triplet as an argument, 4253it must be fully canonicalized. You can see the canonical version of a triplet 4254by running the shell script 4255.Pa config.sub 4256which is included with the sources. 4257.Pp 4258Some sample configuration triplets are: 4259.Li m68k-hp-bsd , 4260.Li mips-dec-ultrix , 4261.Li sparc-sun-sunos . 4262.Pp 4263.Em Xr objdump Target 4264.Pp 4265Ways to specify: 4266.Pp 4267.Bl -enum 4268.It 4269command line option: 4270.Op -b 4271or 4272.Op --target 4273.Pp 4274.It 4275environment variable 4276.Li GNUTARGET 4277.Pp 4278.It 4279deduced from the input file 4280.El 4281.Pp 4282.Em Xr objcopy and Xr strip Input Target 4283.Pp 4284Ways to specify: 4285.Pp 4286.Bl -enum 4287.It 4288command line options: 4289.Op -I 4290or 4291.Op --input-target , 4292or 4293.Op -F 4294or 4295.Op --target 4296.Pp 4297.It 4298environment variable 4299.Li GNUTARGET 4300.Pp 4301.It 4302deduced from the input file 4303.El 4304.Pp 4305.Em Xr objcopy and Xr strip Output Target 4306.Pp 4307Ways to specify: 4308.Pp 4309.Bl -enum 4310.It 4311command line options: 4312.Op -O 4313or 4314.Op --output-target , 4315or 4316.Op -F 4317or 4318.Op --target 4319.Pp 4320.It 4321the input target (see \(lq 4322.Xr objcopy 4323and 4324.Xr strip 4325Input Target\(rq above) 4326.Pp 4327.It 4328environment variable 4329.Li GNUTARGET 4330.Pp 4331.It 4332deduced from the input file 4333.El 4334.Pp 4335.Em Xr nm, Xr size, and Xr strings Target 4336.Pp 4337Ways to specify: 4338.Pp 4339.Bl -enum 4340.It 4341command line option: 4342.Op --target 4343.Pp 4344.It 4345environment variable 4346.Li GNUTARGET 4347.Pp 4348.It 4349deduced from the input file 4350.El 4351.Pp 4352.Ss Architecture Selection 4353An 4354.Em architecture 4355is a type of cpu on which an object file is to run. Its name may contain a 4356colon, separating the name of the processor family from the name of the particular 4357cpu. 4358.Pp 4359The command to list valid architecture values is 4360.Li objdump -i 4361(the second column contains the relevant information). 4362.Pp 4363Sample values: 4364.Li m68k:68020 , 4365.Li mips:3000 , 4366.Li sparc . 4367.Pp 4368.Em Xr objdump Architecture 4369.Pp 4370Ways to specify: 4371.Pp 4372.Bl -enum 4373.It 4374command line option: 4375.Op -m 4376or 4377.Op --architecture 4378.Pp 4379.It 4380deduced from the input file 4381.El 4382.Pp 4383.Em Xr objcopy, Xr nm, Xr size, Xr strings Architecture 4384.Pp 4385Ways to specify: 4386.Pp 4387.Bl -enum 4388.It 4389deduced from the input file 4390.El 4391.Pp 4392.Sh Reporting Bugs 4393Your bug reports play an essential role in making the binary utilities reliable. 4394.Pp 4395Reporting a bug may help you by bringing a solution to your problem, or it 4396may not. But in any case the principal function of a bug report is to help 4397the entire community by making the next version of the binary utilities work 4398better. Bug reports are your contribution to their maintenance. 4399.Pp 4400In order for a bug report to serve its purpose, you must include the information 4401that enables us to fix the bug. 4402.Pp 4403.Ss Have You Found a Bug? 4404If you are not sure whether you have found a bug, here are some guidelines: 4405.Pp 4406.Bl -bullet 4407.It 4408If a binary utility gets a fatal signal, for any input whatever, that is a 4409bug. Reliable utilities never crash. 4410.Pp 4411.It 4412If a binary utility produces an error message for valid input, that is a bug. 4413.Pp 4414.It 4415If you are an experienced user of binary utilities, your suggestions for improvement 4416are welcome in any case. 4417.El 4418.Pp 4419.Ss How to Report Bugs 4420A number of companies and individuals offer support for GNU products. If you 4421obtained the binary utilities from a support organization, we recommend you 4422contact that organization first. 4423.Pp 4424You can find contact information for many support companies and individuals 4425in the file 4426.Pa etc/SERVICE 4427in the GNU Emacs distribution. 4428.Pp 4429The fundamental principle of reporting bugs usefully is this: 4430.Sy report all the facts . 4431If you are not sure whether to state a fact or leave it out, state it! 4432.Pp 4433Often people omit facts because they think they know what causes the problem 4434and assume that some details do not matter. Thus, you might assume that the 4435name of a file you use in an example does not matter. Well, probably it does 4436not, but one cannot be sure. Perhaps the bug is a stray memory reference which 4437happens to fetch from the location where that pathname is stored in memory; 4438perhaps, if the pathname were different, the contents of that location would 4439fool the utility into doing the right thing despite the bug. Play it safe 4440and give a specific, complete example. That is the easiest thing for you to 4441do, and the most helpful. 4442.Pp 4443Keep in mind that the purpose of a bug report is to enable us to fix the bug 4444if it is new to us. Therefore, always write your bug reports on the assumption 4445that the bug has not been reported previously. 4446.Pp 4447Sometimes people give a few sketchy facts and ask, \(lqDoes this ring a bell?\(rq 4448This cannot help us fix a bug, so it is basically useless. We respond by asking 4449for enough details to enable us to investigate. You might as well expedite 4450matters by sending them to begin with. 4451.Pp 4452To enable us to fix the bug, you should include all these things: 4453.Pp 4454.Bl -bullet 4455.It 4456The version of the utility. Each utility announces it if you start it with 4457the 4458.Op --version 4459argument. 4460.Pp 4461Without this, we will not know whether there is any point in looking for the 4462bug in the current version of the binary utilities. 4463.Pp 4464.It 4465Any patches you may have applied to the source, including any patches made 4466to the 4467.Li BFD 4468library. 4469.Pp 4470.It 4471The type of machine you are using, and the operating system name and version 4472number. 4473.Pp 4474.It 4475What compiler (and its version) was used to compile the utilities---e.g. \(lq 4476.Li gcc-2.7 4477\(rq\&. 4478.Pp 4479.It 4480The command arguments you gave the utility to observe the bug. To guarantee 4481you will not omit something important, list them all. A copy of the Makefile 4482(or the output from make) is sufficient. 4483.Pp 4484If we were to try to guess the arguments, we would probably guess wrong and 4485then we might not encounter the bug. 4486.Pp 4487.It 4488A complete input file, or set of input files, that will reproduce the bug. 4489If the utility is reading an object file or files, then it is generally most 4490helpful to send the actual object files. 4491.Pp 4492If the source files were produced exclusively using GNU programs (e.g., 4493.Xr gcc , 4494.Xr gas , 4495and/or the GNU 4496.Xr ld ) , 4497then it may be OK to send the source files rather than the object files. In 4498this case, be sure to say exactly what version of 4499.Xr gcc , 4500or whatever, was used to produce the object files. Also say how 4501.Xr gcc , 4502or whatever, was configured. 4503.Pp 4504.It 4505A description of what behavior you observe that you believe is incorrect. 4506For example, \(lqIt gets a fatal signal.\(rq 4507.Pp 4508Of course, if the bug is that the utility gets a fatal signal, then we will 4509certainly notice it. But if the bug is incorrect output, we might not notice 4510unless it is glaringly wrong. You might as well not give us a chance to make 4511a mistake. 4512.Pp 4513Even if the problem you experience is a fatal signal, you should still say 4514so explicitly. Suppose something strange is going on, such as your copy of 4515the utility is out of sync, or you have encountered a bug in the C library 4516on your system. (This has happened!) Your copy might crash and ours would 4517not. If you told us to expect a crash, then when ours fails to crash, we would 4518know that the bug was not happening for us. If you had not told us to expect 4519a crash, then we would not be able to draw any conclusion from our observations. 4520.Pp 4521.It 4522If you wish to suggest changes to the source, send us context diffs, as generated 4523by 4524.Xr diff 4525with the 4526.Op -u , 4527.Op -c , 4528or 4529.Op -p 4530option. Always send diffs from the old file to the new file. If you wish to 4531discuss something in the 4532.Xr ld 4533source, refer to it by context, not by line number. 4534.Pp 4535The line numbers in our development sources will not match those in your sources. 4536Your line numbers would convey no useful information to us. 4537.El 4538.Pp 4539Here are some things that are not necessary: 4540.Pp 4541.Bl -bullet 4542.It 4543A description of the envelope of the bug. 4544.Pp 4545Often people who encounter a bug spend a lot of time investigating which changes 4546to the input file will make the bug go away and which changes will not affect 4547it. 4548.Pp 4549This is often time consuming and not very useful, because the way we will 4550find the bug is by running a single example under the debugger with breakpoints, 4551not by pure deduction from a series of examples. We recommend that you save 4552your time for something else. 4553.Pp 4554Of course, if you can find a simpler example to report 4555.Em instead 4556of the original one, that is a convenience for us. Errors in the output will 4557be easier to spot, running under the debugger will take less time, and so 4558on. 4559.Pp 4560However, simplification is not vital; if you do not want to do this, report 4561the bug anyway and send us the entire test case you used. 4562.Pp 4563.It 4564A patch for the bug. 4565.Pp 4566A patch for the bug does help us if it is a good one. But do not omit the 4567necessary information, such as the test case, on the assumption that a patch 4568is all we need. We might see problems with your patch and decide to fix the 4569problem another way, or we might not understand it at all. 4570.Pp 4571Sometimes with programs as complicated as the binary utilities it is very 4572hard to construct an example that will make the program follow a certain path 4573through the code. If you do not send us the example, we will not be able to 4574construct one, so we will not be able to verify that the bug is fixed. 4575.Pp 4576And if we cannot understand what bug you are trying to fix, or why your patch 4577should be an improvement, we will not install it. A test case will help us 4578to understand. 4579.Pp 4580.It 4581A guess about what the bug is or what it depends on. 4582.Pp 4583Such guesses are usually wrong. Even we cannot guess right about such things 4584without first using the debugger to find the facts. 4585.El 4586.Pp 4587.Sh GNU Free Documentation License 4588.Bd -filled -offset indent 4589Copyright (C) 2000, 2003 Free Software Foundation, Inc. 51 Franklin Street, 4590Fifth Floor, Boston, MA 02110-1301 USA 4591.Pp 4592Everyone is permitted to copy and distribute verbatim copies of this license 4593document, but changing it is not allowed. 4594.Ed 4595.Pp 4596.Bl -enum 4597.It 4598PREAMBLE 4599.Pp 4600The purpose of this License is to make a manual, textbook, or other written 4601document \(lqfree\(rq in the sense of freedom: to assure everyone the effective freedom 4602to copy and redistribute it, with or without modifying it, either commercially 4603or noncommercially. Secondarily, this License preserves for the author and 4604publisher a way to get credit for their work, while not being considered responsible 4605for modifications made by others. 4606.Pp 4607This License is a kind of \(lqcopyleft\(rq, which means that derivative works of the 4608document must themselves be free in the same sense. It complements the GNU 4609General Public License, which is a copyleft license designed for free software. 4610.Pp 4611We have designed this License in order to use it for manuals for free software, 4612because free software needs free documentation: a free program should come 4613with manuals providing the same freedoms that the software does. But this 4614License is not limited to software manuals; it can be used for any textual 4615work, regardless of subject matter or whether it is published as a printed 4616book. We recommend this License principally for works whose purpose is instruction 4617or reference. 4618.Pp 4619.It 4620APPLICABILITY AND DEFINITIONS 4621.Pp 4622This License applies to any manual or other work that contains a notice placed 4623by the copyright holder saying it can be distributed under the terms of this 4624License. The \(lqDocument\(rq, below, refers to any such manual or work. Any member 4625of the public is a licensee, and is addressed as \(lqyou.\(rq 4626.Pp 4627A \(lqModified Version\(rq of the Document means any work containing the Document 4628or a portion of it, either copied verbatim, or with modifications and/or translated 4629into another language. 4630.Pp 4631A \(lqSecondary Section\(rq is a named appendix or a front-matter section of the Document 4632that deals exclusively with the relationship of the publishers or authors 4633of the Document to the Document's overall subject (or to related matters) 4634and contains nothing that could fall directly within that overall subject. 4635(For example, if the Document is in part a textbook of mathematics, a Secondary 4636Section may not explain any mathematics.) The relationship could be a matter 4637of historical connection with the subject or with related matters, or of legal, 4638commercial, philosophical, ethical or political position regarding them. 4639.Pp 4640The \(lqInvariant Sections\(rq are certain Secondary Sections whose titles are designated, 4641as being those of Invariant Sections, in the notice that says that the Document 4642is released under this License. 4643.Pp 4644The \(lqCover Texts\(rq are certain short passages of text that are listed, as Front-Cover 4645Texts or Back-Cover Texts, in the notice that says that the Document is released 4646under this License. 4647.Pp 4648A \(lqTransparent\(rq copy of the Document means a machine-readable copy, represented 4649in a format whose specification is available to the general public, whose 4650contents can be viewed and edited directly and straightforwardly with generic 4651text editors or (for images composed of pixels) generic paint programs or 4652(for drawings) some widely available drawing editor, and that is suitable 4653for input to text formatters or for automatic translation to a variety of 4654formats suitable for input to text formatters. A copy made in an otherwise 4655Transparent file format whose markup has been designed to thwart or discourage 4656subsequent modification by readers is not Transparent. A copy that is not 4657\(lqTransparent\(rq is called \(lqOpaque.\(rq 4658.Pp 4659Examples of suitable formats for Transparent copies include plain ASCII without 4660markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly 4661available DTD, and standard-conforming simple HTML designed for human modification. 4662Opaque formats include PostScript, PDF, proprietary formats that can be read 4663and edited only by proprietary word processors, SGML or XML for which the 4664DTD and/or processing tools are not generally available, and the machine-generated 4665HTML produced by some word processors for output purposes only. 4666.Pp 4667The \(lqTitle Page\(rq means, for a printed book, the title page itself, plus such 4668following pages as are needed to hold, legibly, the material this License 4669requires to appear in the title page. For works in formats which do not have 4670any title page as such, \(lqTitle Page\(rq means the text near the most prominent 4671appearance of the work's title, preceding the beginning of the body of the 4672text. 4673.Pp 4674.It 4675VERBATIM COPYING 4676.Pp 4677You may copy and distribute the Document in any medium, either commercially 4678or noncommercially, provided that this License, the copyright notices, and 4679the license notice saying this License applies to the Document are reproduced 4680in all copies, and that you add no other conditions whatsoever to those of 4681this License. You may not use technical measures to obstruct or control the 4682reading or further copying of the copies you make or distribute. However, 4683you may accept compensation in exchange for copies. If you distribute a large 4684enough number of copies you must also follow the conditions in section 3. 4685.Pp 4686You may also lend copies, under the same conditions stated above, and you 4687may publicly display copies. 4688.Pp 4689.It 4690COPYING IN QUANTITY 4691.Pp 4692If you publish printed copies of the Document numbering more than 100, and 4693the Document's license notice requires Cover Texts, you must enclose the copies 4694in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover 4695Texts on the front cover, and Back-Cover Texts on the back cover. Both covers 4696must also clearly and legibly identify you as the publisher of these copies. 4697The front cover must present the full title with all words of the title equally 4698prominent and visible. You may add other material on the covers in addition. 4699Copying with changes limited to the covers, as long as they preserve the title 4700of the Document and satisfy these conditions, can be treated as verbatim copying 4701in other respects. 4702.Pp 4703If the required texts for either cover are too voluminous to fit legibly, 4704you should put the first ones listed (as many as fit reasonably) on the actual 4705cover, and continue the rest onto adjacent pages. 4706.Pp 4707If you publish or distribute Opaque copies of the Document numbering more 4708than 100, you must either include a machine-readable Transparent copy along 4709with each Opaque copy, or state in or with each Opaque copy a publicly-accessible 4710computer-network location containing a complete Transparent copy of the Document, 4711free of added material, which the general network-using public has access 4712to download anonymously at no charge using public-standard network protocols. 4713If you use the latter option, you must take reasonably prudent steps, when 4714you begin distribution of Opaque copies in quantity, to ensure that this Transparent 4715copy will remain thus accessible at the stated location until at least one 4716year after the last time you distribute an Opaque copy (directly or through 4717your agents or retailers) of that edition to the public. 4718.Pp 4719It is requested, but not required, that you contact the authors of the Document 4720well before redistributing any large number of copies, to give them a chance 4721to provide you with an updated version of the Document. 4722.Pp 4723.It 4724MODIFICATIONS 4725.Pp 4726You may copy and distribute a Modified Version of the Document under the conditions 4727of sections 2 and 3 above, provided that you release the Modified Version 4728under precisely this License, with the Modified Version filling the role of 4729the Document, thus licensing distribution and modification of the Modified 4730Version to whoever possesses a copy of it. In addition, you must do these 4731things in the Modified Version: 4732.Pp 4733A. Use in the Title Page (and on the covers, if any) a title distinct from 4734that of the Document, and from those of previous versions (which should, if 4735there were any, be listed in the History section of the Document). You may 4736use the same title as a previous version if the original publisher of that 4737version gives permission. B. List on the Title Page, as authors, one or more 4738persons or entities responsible for authorship of the modifications in the 4739Modified Version, together with at least five of the principal authors of 4740the Document (all of its principal authors, if it has less than five). C. 4741State on the Title page the name of the publisher of the Modified Version, 4742as the publisher. D. Preserve all the copyright notices of the Document. 4743E. Add an appropriate copyright notice for your modifications adjacent to 4744the other copyright notices. F. Include, immediately after the copyright 4745notices, a license notice giving the public permission to use the Modified 4746Version under the terms of this License, in the form shown in the Addendum 4747below. G. Preserve in that license notice the full lists of Invariant Sections 4748and required Cover Texts given in the Document's license notice. H. Include 4749an unaltered copy of this License. I. Preserve the section entitled \(lqHistory\(rq, 4750and its title, and add to it an item stating at least the title, year, new 4751authors, and publisher of the Modified Version as given on the Title Page. 4752If there is no section entitled \(lqHistory\(rq in the Document, create one stating 4753the title, year, authors, and publisher of the Document as given on its Title 4754Page, then add an item describing the Modified Version as stated in the previous 4755sentence. J. Preserve the network location, if any, given in the Document 4756for public access to a Transparent copy of the Document, and likewise the 4757network locations given in the Document for previous versions it was based 4758on. These may be placed in the \(lqHistory\(rq section. You may omit a network location 4759for a work that was published at least four years before the Document itself, 4760or if the original publisher of the version it refers to gives permission. 4761K. In any section entitled \(lqAcknowledgements\(rq or \(lqDedications\(rq, preserve the section's 4762title, and preserve in the section all the substance and tone of each of the 4763contributor acknowledgements and/or dedications given therein. L. Preserve 4764all the Invariant Sections of the Document, unaltered in their text and in 4765their titles. Section numbers or the equivalent are not considered part of 4766the section titles. M. Delete any section entitled \(lqEndorsements.\(rq Such a section 4767may not be included in the Modified Version. N. Do not retitle any existing 4768section as \(lqEndorsements\(rq or to conflict in title with any Invariant Section. 4769.Pp 4770If the Modified Version includes new front-matter sections or appendices that 4771qualify as Secondary Sections and contain no material copied from the Document, 4772you may at your option designate some or all of these sections as invariant. 4773To do this, add their titles to the list of Invariant Sections in the Modified 4774Version's license notice. These titles must be distinct from any other section 4775titles. 4776.Pp 4777You may add a section entitled \(lqEndorsements\(rq, provided it contains nothing 4778but endorsements of your Modified Version by various parties--for example, 4779statements of peer review or that the text has been approved by an organization 4780as the authoritative definition of a standard. 4781.Pp 4782You may add a passage of up to five words as a Front-Cover Text, and a passage 4783of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts 4784in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover 4785Text may be added by (or through arrangements made by) any one entity. If 4786the Document already includes a cover text for the same cover, previously 4787added by you or by arrangement made by the same entity you are acting on behalf 4788of, you may not add another; but you may replace the old one, on explicit 4789permission from the previous publisher that added the old one. 4790.Pp 4791The author(s) and publisher(s) of the Document do not by this License give 4792permission to use their names for publicity for or to assert or imply endorsement 4793of any Modified Version. 4794.Pp 4795.It 4796COMBINING DOCUMENTS 4797.Pp 4798You may combine the Document with other documents released under this License, 4799under the terms defined in section 4 above for modified versions, provided 4800that you include in the combination all of the Invariant Sections of all of 4801the original documents, unmodified, and list them all as Invariant Sections 4802of your combined work in its license notice. 4803.Pp 4804The combined work need only contain one copy of this License, and multiple 4805identical Invariant Sections may be replaced with a single copy. If there 4806are multiple Invariant Sections with the same name but different contents, 4807make the title of each such section unique by adding at the end of it, in 4808parentheses, the name of the original author or publisher of that section 4809if known, or else a unique number. Make the same adjustment to the section 4810titles in the list of Invariant Sections in the license notice of the combined 4811work. 4812.Pp 4813In the combination, you must combine any sections entitled \(lqHistory\(rq in the 4814various original documents, forming one section entitled \(lqHistory\(rq; likewise 4815combine any sections entitled \(lqAcknowledgements\(rq, and any sections entitled 4816\(lqDedications.\(rq You must delete all sections entitled \(lqEndorsements.\(rq 4817.Pp 4818.It 4819COLLECTIONS OF DOCUMENTS 4820.Pp 4821You may make a collection consisting of the Document and other documents released 4822under this License, and replace the individual copies of this License in the 4823various documents with a single copy that is included in the collection, provided 4824that you follow the rules of this License for verbatim copying of each of 4825the documents in all other respects. 4826.Pp 4827You may extract a single document from such a collection, and distribute it 4828individually under this License, provided you insert a copy of this License 4829into the extracted document, and follow this License in all other respects 4830regarding verbatim copying of that document. 4831.Pp 4832.It 4833AGGREGATION WITH INDEPENDENT WORKS 4834.Pp 4835A compilation of the Document or its derivatives with other separate and independent 4836documents or works, in or on a volume of a storage or distribution medium, 4837does not as a whole count as a Modified Version of the Document, provided 4838no compilation copyright is claimed for the compilation. Such a compilation 4839is called an \(lqaggregate\(rq, and this License does not apply to the other self-contained 4840works thus compiled with the Document, on account of their being thus compiled, 4841if they are not themselves derivative works of the Document. 4842.Pp 4843If the Cover Text requirement of section 3 is applicable to these copies of 4844the Document, then if the Document is less than one quarter of the entire 4845aggregate, the Document's Cover Texts may be placed on covers that surround 4846only the Document within the aggregate. Otherwise they must appear on covers 4847around the whole aggregate. 4848.Pp 4849.It 4850TRANSLATION 4851.Pp 4852Translation is considered a kind of modification, so you may distribute translations 4853of the Document under the terms of section 4. Replacing Invariant Sections 4854with translations requires special permission from their copyright holders, 4855but you may include translations of some or all Invariant Sections in addition 4856to the original versions of these Invariant Sections. You may include a translation 4857of this License provided that you also include the original English version 4858of this License. In case of a disagreement between the translation and the 4859original English version of this License, the original English version will 4860prevail. 4861.Pp 4862.It 4863TERMINATION 4864.Pp 4865You may not copy, modify, sublicense, or distribute the Document except as 4866expressly provided for under this License. Any other attempt to copy, modify, 4867sublicense or distribute the Document is void, and will automatically terminate 4868your rights under this License. However, parties who have received copies, 4869or rights, from you under this License will not have their licenses terminated 4870so long as such parties remain in full compliance. 4871.Pp 4872.It 4873FUTURE REVISIONS OF THIS LICENSE 4874.Pp 4875The Free Software Foundation may publish new, revised versions of the GNU 4876Free Documentation License from time to time. Such new versions will be similar 4877in spirit to the present version, but may differ in detail to address new 4878problems or concerns. See http://www.gnu.org/copyleft/. 4879.Pp 4880Each version of the License is given a distinguishing version number. If the 4881Document specifies that a particular numbered version of this License \(lqor any 4882later version\(rq applies to it, you have the option of following the terms and 4883conditions either of that specified version or of any later version that has 4884been published (not as a draft) by the Free Software Foundation. If the Document 4885does not specify a version number of this License, you may choose any version 4886ever published (not as a draft) by the Free Software Foundation. 4887.Pp 4888.El 4889.Ss ADDENDUM: How to use this License for your documents 4890To use this License in a document you have written, include a copy of the 4891License in the document and put the following copyright and license notices 4892just after the title page: 4893.Pp 4894.Bd -literal -offset indent 4895 4896Copyright (C) year your name. 4897Permission is granted to copy, distribute and/or modify this document 4898under the terms of the GNU Free Documentation License, Version 1.1 4899or any later version published by the Free Software Foundation; 4900with the Invariant Sections being list their titles, with the 4901Front-Cover Texts being list, and with the Back-Cover Texts being list. 4902A copy of the license is included in the section entitled "GNU 4903Free Documentation License." 4904 4905.Ed 4906.Pp 4907If you have no Invariant Sections, write \(lqwith no Invariant Sections\(rq instead 4908of saying which ones are invariant. If you have no Front-Cover Texts, write 4909\(lqno Front-Cover Texts\(rq instead of \(lqFront-Cover Texts being 4910.Va list 4911\(rq; likewise for Back-Cover Texts. 4912.Pp 4913If your document contains nontrivial examples of program code, we recommend 4914releasing these examples in parallel under your choice of free software license, 4915such as the GNU General Public License, to permit their use in free software. 4916.Pp 4917.Sh Binutils Index 4918