]> oss.titaniummirror.com Git - msp430-binutils.git/blobdiff - binutils/doc/objcopy.1
Imported binutils-2.20
[msp430-binutils.git] / binutils / doc / objcopy.1
index 438d5248079d38f9be9e46b35f55840c7f1c4bc3..cc041c0c100f53334ca279799c0cecc6f494ee5f 100644 (file)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
+.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
 .    ds R" ''
 'br\}
 .\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\"
 .\" If the F register is turned on, we'll generate index entries on stderr for
 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 .\" entries marked with X<> in POD.  Of course, you'll have to process the
 .\" output yourself in some meaningful fashion.
-.if \nF \{\
+.ie \nF \{\
 .    de IX
 .    tm Index:\\$1\t\\n%\t"\\$2"
 ..
 .    nr % 0
 .    rr F
 .\}
-.\"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.hy 0
+.el \{\
+.    de IX
+..
+.\}
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "OBJCOPY 1"
-.TH OBJCOPY 1 "2007-08-06" "binutils-2.17.90" "GNU Development Tools"
+.TH OBJCOPY 1 "2009-10-16" "binutils-2.20" "GNU Development Tools"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
 .SH "NAME"
 objcopy \- copy and translate object files
 .SH "SYNOPSIS"
@@ -168,6 +176,7 @@ objcopy [\fB\-F\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR]
         [\fB\-\-set\-section\-flags\fR \fIsection\fR=\fIflags\fR]
         [\fB\-\-add\-section\fR \fIsectionname\fR=\fIfilename\fR]
         [\fB\-\-rename\-section\fR \fIoldname\fR=\fInewname\fR[,\fIflags\fR]]
+        [\fB\-\-long\-section\-names\fR {enable,disable,keep}]
         [\fB\-\-change\-leading\-char\fR] [\fB\-\-remove\-leading\-char\fR]
         [\fB\-\-reverse\-bytes=\fR\fInum\fR]
         [\fB\-\-srec\-len=\fR\fIival\fR] [\fB\-\-srec\-forceS3\fR]
@@ -193,6 +202,12 @@ objcopy [\fB\-F\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR]
         [\fB\-\-readonly\-text\fR]
         [\fB\-\-pure\fR]
         [\fB\-\-impure\fR]
+        [\fB\-\-file\-alignment=\fR\fInum\fR]
+        [\fB\-\-heap=\fR\fIsize\fR]
+        [\fB\-\-image\-base=\fR\fIaddress\fR]
+        [\fB\-\-section\-alignment=\fR\fInum\fR]
+        [\fB\-\-stack=\fR\fIsize\fR]
+        [\fB\-\-subsystem=\fR\fIwhich\fR:\fImajor\fR.\fIminor\fR]
         [\fB\-v\fR|\fB\-\-verbose\fR]
         [\fB\-V\fR|\fB\-\-version\fR]
         [\fB\-\-help\fR] [\fB\-\-info\fR]
@@ -212,7 +227,7 @@ between any two formats may not work as expected.
 deletes them afterward.  \fBobjcopy\fR uses \s-1BFD\s0 to do all its
 translation work; it has access to all the formats described in \s-1BFD\s0
 and thus is able to recognize most formats without being told
-explicitly.  
+explicitly.
 .PP
 \&\fBobjcopy\fR can be used to generate S\-records by using an output
 target of \fBsrec\fR (e.g., use \fB\-O srec\fR).
@@ -253,7 +268,7 @@ the name of \fIinfile\fR.
 .IX Item "--input-target=bfdname"
 .PD
 Consider the source file's object format to be \fIbfdname\fR, rather than
-attempting to deduce it.  
+attempting to deduce it.
 .IP "\fB\-O\fR \fIbfdname\fR" 4
 .IX Item "-O bfdname"
 .PD 0
@@ -269,7 +284,7 @@ Write the output file using the object format \fIbfdname\fR.
 .PD
 Use \fIbfdname\fR as the object format for both the input and the output
 file; i.e., simply transfer data from source to destination with no
-translation.  
+translation.
 .IP "\fB\-B\fR \fIbfdarch\fR" 4
 .IX Item "-B bfdarch"
 .PD 0
@@ -567,6 +582,18 @@ data you could use the following command line to achieve it:
 \&           \-\-rename\-section .data=.rodata,alloc,load,readonly,data,contents \e
 \&           <input_binary_file> <output_object_file>
 .Ve
+.IP "\fB\-\-long\-section\-names {enable,disable,keep}\fR" 4
+.IX Item "--long-section-names {enable,disable,keep}"
+Controls the handling of long section names when processing \f(CW\*(C`COFF\*(C'\fR
+and \f(CW\*(C`PE\-COFF\*(C'\fR object formats.  The default behaviour, \fBkeep\fR,
+is to preserve long section names if any are present in the input file.
+The \fBenable\fR and \fBdisable\fR options forcibly enable or disable
+the use of long section names in the output object; when \fBdisable\fR
+is in effect, any long section names in the input object will be truncated.
+The \fBenable\fR option will only emit long section names if any are
+present in the inputs; this is mostly the same as \fBkeep\fR, but it
+is left undefined whether the \fBenable\fR option might force the 
+creation of an empty string table in the output file.
 .IP "\fB\-\-change\-leading\-char\fR" 4
 .IX Item "--change-leading-char"
 Some object file formats use special characters at the start of
@@ -755,7 +782,7 @@ to add a link to the debugging info into the stripped executable.
 .RE
 .RS 4
 .Sp
-Note \- the choice of \f(CW\*(C`.dbg\*(C'\fR as an extension for the debug info
+Note\-\-\-the choice of \f(CW\*(C`.dbg\*(C'\fR as an extension for the debug info
 file is arbitrary.  Also the \f(CW\*(C`\-\-only\-keep\-debug\*(C'\fR step is
 optional.  You could instead do this:
 .IP "1.<Link the executable as normal.>" 4
@@ -778,23 +805,74 @@ i.e., the file pointed to by the \fB\-\-add\-gnu\-debuglink\fR can be the
 full executable.  It does not have to be a file created by the
 \&\fB\-\-only\-keep\-debug\fR switch.
 .Sp
-Note \- this switch is only intended for use on fully linked files.  It
+Note\-\-\-this switch is only intended for use on fully linked files.  It
 does not make sense to use it on object files where the debugging
 information may be incomplete.  Besides the gnu_debuglink feature
 currently only supports the presence of one filename containing
 debugging information, not multiple filenames on a one-per-object-file
 basis.
 .RE
+.IP "\fB\-\-file\-alignment\fR \fInum\fR" 4
+.IX Item "--file-alignment num"
+Specify the file alignment.  Sections in the file will always begin at
+file offsets which are multiples of this number.  This defaults to
+512.
+[This option is specific to \s-1PE\s0 targets.]
+.IP "\fB\-\-heap\fR \fIreserve\fR" 4
+.IX Item "--heap reserve"
+.PD 0
+.IP "\fB\-\-heap\fR \fIreserve\fR\fB,\fR\fIcommit\fR" 4
+.IX Item "--heap reserve,commit"
+.PD
+Specify the number of bytes of memory to reserve (and optionally commit)
+to be used as heap for this program.
+[This option is specific to \s-1PE\s0 targets.]
+.IP "\fB\-\-image\-base\fR \fIvalue\fR" 4
+.IX Item "--image-base value"
+Use \fIvalue\fR as the base address of your program or dll.  This is
+the lowest memory location that will be used when your program or dll
+is loaded.  To reduce the need to relocate and improve performance of
+your dlls, each should have a unique base address and not overlap any
+other dlls.  The default is 0x400000 for executables, and 0x10000000
+for dlls.
+[This option is specific to \s-1PE\s0 targets.]
+.IP "\fB\-\-section\-alignment\fR \fInum\fR" 4
+.IX Item "--section-alignment num"
+Sets the section alignment.  Sections in memory will always begin at
+addresses which are a multiple of this number.  Defaults to 0x1000.
+[This option is specific to \s-1PE\s0 targets.]
+.IP "\fB\-\-stack\fR \fIreserve\fR" 4
+.IX Item "--stack reserve"
+.PD 0
+.IP "\fB\-\-stack\fR \fIreserve\fR\fB,\fR\fIcommit\fR" 4
+.IX Item "--stack reserve,commit"
+.PD
+Specify the number of bytes of memory to reserve (and optionally commit)
+to be used as stack for this program.
+[This option is specific to \s-1PE\s0 targets.]
+.IP "\fB\-\-subsystem\fR \fIwhich\fR" 4
+.IX Item "--subsystem which"
+.PD 0
+.IP "\fB\-\-subsystem\fR \fIwhich\fR\fB:\fR\fImajor\fR" 4
+.IX Item "--subsystem which:major"
+.IP "\fB\-\-subsystem\fR \fIwhich\fR\fB:\fR\fImajor\fR\fB.\fR\fIminor\fR" 4
+.IX Item "--subsystem which:major.minor"
+.PD
+Specifies the subsystem under which your program will execute.  The
+legal values for \fIwhich\fR are \f(CW\*(C`native\*(C'\fR, \f(CW\*(C`windows\*(C'\fR,
+\&\f(CW\*(C`console\*(C'\fR, \f(CW\*(C`posix\*(C'\fR, \f(CW\*(C`efi\-app\*(C'\fR, \f(CW\*(C`efi\-bsd\*(C'\fR,
+\&\f(CW\*(C`efi\-rtd\*(C'\fR, \f(CW\*(C`sal\-rtd\*(C'\fR, and \f(CW\*(C`xbox\*(C'\fR.  You may optionally set
+the subsystem version also.  Numeric values are also accepted for
+\&\fIwhich\fR.
+[This option is specific to \s-1PE\s0 targets.]
 .IP "\fB\-\-extract\-symbol\fR" 4
 .IX Item "--extract-symbol"
 Keep the file's section flags and symbols but remove all section data.
 Specifically, the option:
 .RS 4
-.IP "*<sets the virtual and load addresses of every section to zero;>" 4
-.IX Item "*<sets the virtual and load addresses of every section to zero;>"
-.PD 0
 .IP "*<removes the contents of all sections;>" 4
 .IX Item "*<removes the contents of all sections;>"
+.PD 0
 .IP "*<sets the size of every section to zero; and>" 4
 .IX Item "*<sets the size of every section to zero; and>"
 .IP "*<sets the file's start address to zero.>" 4
@@ -833,7 +911,7 @@ Display a list showing all architectures and object formats available.
 Read command-line options from \fIfile\fR.  The options read are
 inserted in place of the original @\fIfile\fR option.  If \fIfile\fR
 does not exist, or cannot be read, then the option will be treated
-literally, and not removed.  
+literally, and not removed.
 .Sp
 Options in \fIfile\fR are separated by whitespace.  A whitespace
 character may be included in an option by surrounding the entire
@@ -847,10 +925,10 @@ with a backslash.  The \fIfile\fR may itself contain additional
 .SH "COPYRIGHT"
 .IX Header "COPYRIGHT"
 Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 .PP
 Permission is granted to copy, distribute and/or modify this document
-under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
+under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3
 or any later version published by the Free Software Foundation;
 with no Invariant Sections, with no Front-Cover Texts, and with no
 Back-Cover Texts.  A copy of the license is included in the