| 1 | .rn '' }` |
| 2 | ''' $RCSfile$$Revision$$Date$ |
| 3 | ''' |
| 4 | ''' $Log$ |
| 5 | ''' Revision 1.10 2001/03/25 20:32:25 nickc |
| 6 | ''' Automate generate on man pages |
| 7 | ''' |
| 8 | ''' |
| 9 | .de Sh |
| 10 | .br |
| 11 | .if t .Sp |
| 12 | .ne 5 |
| 13 | .PP |
| 14 | \fB\\$1\fR |
| 15 | .PP |
| 16 | .. |
| 17 | .de Sp |
| 18 | .if t .sp .5v |
| 19 | .if n .sp |
| 20 | .. |
| 21 | .de Ip |
| 22 | .br |
| 23 | .ie \\n(.$>=3 .ne \\$3 |
| 24 | .el .ne 3 |
| 25 | .IP "\\$1" \\$2 |
| 26 | .. |
| 27 | .de Vb |
| 28 | .ft CW |
| 29 | .nf |
| 30 | .ne \\$1 |
| 31 | .. |
| 32 | .de Ve |
| 33 | .ft R |
| 34 | |
| 35 | .fi |
| 36 | .. |
| 37 | ''' |
| 38 | ''' |
| 39 | ''' Set up \*(-- to give an unbreakable dash; |
| 40 | ''' string Tr holds user defined translation string. |
| 41 | ''' Bell System Logo is used as a dummy character. |
| 42 | ''' |
| 43 | .tr \(*W-|\(bv\*(Tr |
| 44 | .ie n \{\ |
| 45 | .ds -- \(*W- |
| 46 | .ds PI pi |
| 47 | .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch |
| 48 | .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch |
| 49 | .ds L" "" |
| 50 | .ds R" "" |
| 51 | ''' \*(M", \*(S", \*(N" and \*(T" are the equivalent of |
| 52 | ''' \*(L" and \*(R", except that they are used on ".xx" lines, |
| 53 | ''' such as .IP and .SH, which do another additional levels of |
| 54 | ''' double-quote interpretation |
| 55 | .ds M" """ |
| 56 | .ds S" """ |
| 57 | .ds N" """"" |
| 58 | .ds T" """"" |
| 59 | .ds L' ' |
| 60 | .ds R' ' |
| 61 | .ds M' ' |
| 62 | .ds S' ' |
| 63 | .ds N' ' |
| 64 | .ds T' ' |
| 65 | 'br\} |
| 66 | .el\{\ |
| 67 | .ds -- \(em\| |
| 68 | .tr \*(Tr |
| 69 | .ds L" `` |
| 70 | .ds R" '' |
| 71 | .ds M" `` |
| 72 | .ds S" '' |
| 73 | .ds N" `` |
| 74 | .ds T" '' |
| 75 | .ds L' ` |
| 76 | .ds R' ' |
| 77 | .ds M' ` |
| 78 | .ds S' ' |
| 79 | .ds N' ` |
| 80 | .ds T' ' |
| 81 | .ds PI \(*p |
| 82 | 'br\} |
| 83 | .\" If the F register is turned on, we'll generate |
| 84 | .\" index entries out stderr for the following things: |
| 85 | .\" TH Title |
| 86 | .\" SH Header |
| 87 | .\" Sh Subsection |
| 88 | .\" Ip Item |
| 89 | .\" X<> Xref (embedded |
| 90 | .\" Of course, you have to process the output yourself |
| 91 | .\" in some meaninful fashion. |
| 92 | .if \nF \{ |
| 93 | .de IX |
| 94 | .tm Index:\\$1\t\\n%\t"\\$2" |
| 95 | .. |
| 96 | .nr % 0 |
| 97 | .rr F |
| 98 | .\} |
| 99 | .TH OBJCOPY.1 1 "binutils-2.11.90" "23/Mar/101" "GNU" |
| 100 | .UC |
| 101 | .if n .hy 0 |
| 102 | .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' |
| 103 | .de CQ \" put $1 in typewriter font |
| 104 | .ft CW |
| 105 | 'if n "\c |
| 106 | 'if t \\&\\$1\c |
| 107 | 'if n \\&\\$1\c |
| 108 | 'if n \&" |
| 109 | \\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7 |
| 110 | '.ft R |
| 111 | .. |
| 112 | .\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2 |
| 113 | . \" AM - accent mark definitions |
| 114 | .bd B 3 |
| 115 | . \" fudge factors for nroff and troff |
| 116 | .if n \{\ |
| 117 | . ds #H 0 |
| 118 | . ds #V .8m |
| 119 | . ds #F .3m |
| 120 | . ds #[ \f1 |
| 121 | . ds #] \fP |
| 122 | .\} |
| 123 | .if t \{\ |
| 124 | . ds #H ((1u-(\\\\n(.fu%2u))*.13m) |
| 125 | . ds #V .6m |
| 126 | . ds #F 0 |
| 127 | . ds #[ \& |
| 128 | . ds #] \& |
| 129 | .\} |
| 130 | . \" simple accents for nroff and troff |
| 131 | .if n \{\ |
| 132 | . ds ' \& |
| 133 | . ds ` \& |
| 134 | . ds ^ \& |
| 135 | . ds , \& |
| 136 | . ds ~ ~ |
| 137 | . ds ? ? |
| 138 | . ds ! ! |
| 139 | . ds / |
| 140 | . ds q |
| 141 | .\} |
| 142 | .if t \{\ |
| 143 | . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" |
| 144 | . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' |
| 145 | . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' |
| 146 | . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' |
| 147 | . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' |
| 148 | . ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10' |
| 149 | . ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m' |
| 150 | . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' |
| 151 | . ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10' |
| 152 | .\} |
| 153 | . \" troff and (daisy-wheel) nroff accents |
| 154 | .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' |
| 155 | .ds 8 \h'\*(#H'\(*b\h'-\*(#H' |
| 156 | .ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#] |
| 157 | .ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u' |
| 158 | .ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u' |
| 159 | .ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#] |
| 160 | .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] |
| 161 | .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' |
| 162 | .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' |
| 163 | .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] |
| 164 | .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] |
| 165 | .ds ae a\h'-(\w'a'u*4/10)'e |
| 166 | .ds Ae A\h'-(\w'A'u*4/10)'E |
| 167 | .ds oe o\h'-(\w'o'u*4/10)'e |
| 168 | .ds Oe O\h'-(\w'O'u*4/10)'E |
| 169 | . \" corrections for vroff |
| 170 | .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' |
| 171 | .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' |
| 172 | . \" for low resolution devices (crt and lpr) |
| 173 | .if \n(.H>23 .if \n(.V>19 \ |
| 174 | \{\ |
| 175 | . ds : e |
| 176 | . ds 8 ss |
| 177 | . ds v \h'-1'\o'\(aa\(ga' |
| 178 | . ds _ \h'-1'^ |
| 179 | . ds . \h'-1'. |
| 180 | . ds 3 3 |
| 181 | . ds o a |
| 182 | . ds d- d\h'-1'\(ga |
| 183 | . ds D- D\h'-1'\(hy |
| 184 | . ds th \o'bp' |
| 185 | . ds Th \o'LP' |
| 186 | . ds ae ae |
| 187 | . ds Ae AE |
| 188 | . ds oe oe |
| 189 | . ds Oe OE |
| 190 | .\} |
| 191 | .rm #[ #] #H #V #F C |
| 192 | .SH "NAME" |
| 193 | objcopy \- copy and translate object files |
| 194 | .SH "SYNOPSIS" |
| 195 | objcopy [ \-F \fIbfdname\fR | --target=\fIbfdname\fR ] |
| 196 | [ \-I \fIbfdname\fR | --input-target=\fIbfdname\fR ] |
| 197 | [ \-O \fIbfdname\fR | --output-target=\fIbfdname\fR ] |
| 198 | [ \-B \fIbfdarch\fR | --binary-architecture=\fIbfdarch\fR ] |
| 199 | [ \-S | --strip-all ] [ \-g | --strip-debug ] |
| 200 | [ \-K \fIsymbolname\fR | --keep-symbol=\fIsymbolname\fR ] |
| 201 | [ \-N \fIsymbolname\fR | --strip-symbol=\fIsymbolname\fR ] |
| 202 | [ \-L \fIsymbolname\fR | --localize-symbol=\fIsymbolname\fR ] |
| 203 | [ \-W \fIsymbolname\fR | --weaken-symbol=\fIsymbolname\fR ] |
| 204 | [ \-x | --discard-all ] [ \-X | --discard-locals ] |
| 205 | [ \-b \fIbyte\fR | --byte=\fIbyte\fR ] |
| 206 | [ \-i \fIinterleave\fR | --interleave=\fIinterleave\fR ] |
| 207 | [ \-j \fIsectionname\fR | --only-section=\fIsectionname\fR ] |
| 208 | [ \-R \fIsectionname\fR | --remove-section=\fIsectionname\fR ] |
| 209 | [ \-p | --preserve-dates ] [ --debugging ] |
| 210 | [ --gap-fill=\fIval\fR ] [ --pad-to=\fIaddress\fR ] |
| 211 | [ --set-start=\fIval\fR ] [ --adjust-start=\fIincr\fR ] |
| 212 | [ --change-addresses=\fIincr\fR ] |
| 213 | [ --change-section-address \fIsection\fR{=,+,\-}\fIval\fR ] |
| 214 | [ --change-section-lma \fIsection\fR{=,+,\-}\fIval\fR ] |
| 215 | [ --change-section-vma \fIsection\fR{=,+,\-}\fIval\fR ] |
| 216 | [ --change-warnings ] [ --no-change-warnings ] |
| 217 | [ --set-section-flags \fIsection\fR=\fIflags\fR ] |
| 218 | [ --add-section \fIsectionname\fR=\fIfilename\fR ] |
| 219 | [ --change-leading-char ] [ --remove-leading-char ] |
| 220 | [ --srec-len=\fIival\fR ] [ --srec-forceS3 ] |
| 221 | [ --redefine-sym \fIold\fR=\fInew\fR ] [ --weaken ] |
| 222 | [ \-v | --verbose ] [ \-V | --version ] [ --help ] |
| 223 | \fIinfile\fR [\fIoutfile\fR] |
| 224 | .SH "DESCRIPTION" |
| 225 | The GNU \f(CWobjcopy\fR utility copies the contents of an object |
| 226 | file to another. \f(CWobjcopy\fR uses the GNU BFD Library to |
| 227 | read and write the object files. It can write the destination object |
| 228 | file in a format different from that of the source object file. The |
| 229 | exact behavior of \f(CWobjcopy\fR is controlled by command-line options. |
| 230 | Note that \f(CWobjcopy\fR should be able to copy a fully linked file |
| 231 | between any two formats. However, copying a relocatable object file |
| 232 | between any two formats may not work as expected. |
| 233 | .PP |
| 234 | \f(CWobjcopy\fR creates temporary files to do its translations and |
| 235 | deletes them afterward. \f(CWobjcopy\fR uses BFD to do all its |
| 236 | translation work; it has access to all the formats described in BFD |
| 237 | and thus is able to recognize most formats without being told |
| 238 | explicitly. |
| 239 | .PP |
| 240 | \f(CWobjcopy\fR can be used to generate S\-records by using an output |
| 241 | target of \fBsrec\fR (e.g., use \fB\-O srec\fR). |
| 242 | .PP |
| 243 | \f(CWobjcopy\fR can be used to generate a raw binary file by using an |
| 244 | output target of \fBbinary\fR (e.g., use \fB\-O binary\fR). When |
| 245 | \f(CWobjcopy\fR generates a raw binary file, it will essentially produce |
| 246 | a memory dump of the contents of the input object file. All symbols and |
| 247 | relocation information will be discarded. The memory dump will start at |
| 248 | the load address of the lowest section copied into the output file. |
| 249 | .PP |
| 250 | When generating an S\-record or a raw binary file, it may be helpful to |
| 251 | use \fB\-S\fR to remove sections containing debugging information. In |
| 252 | some cases \fB\-R\fR will be useful to remove sections which contain |
| 253 | information that is not needed by the binary file. |
| 254 | .PP |
| 255 | Note \- \f(CWobjcopy\fR is not able to change the endianness of its input |
| 256 | files. If the input format has an endianness, (some formats do not), |
| 257 | \f(CWobjcopy\fR can only copy the inputs into file formats that have the |
| 258 | same endianness or which have no endianness (eg \fBsrec\fR). |
| 259 | .SH "OPTIONS" |
| 260 | .Ip "\f(CW\fIinfile\fR\fR" 4 |
| 261 | .Ip "\f(CW\fIoutfile\fR\fR" 4 |
| 262 | The input and output files, respectively. |
| 263 | If you do not specify \fIoutfile\fR, \f(CWobjcopy\fR creates a |
| 264 | temporary file and destructively renames the result with |
| 265 | the name of \fIinfile\fR. |
| 266 | .Ip "\f(CW-I \fIbfdname\fR \fR" 4 |
| 267 | .Ip "\f(CW--input-target=\fIbfdname\fR\fR" 4 |
| 268 | Consider the source file's object format to be \fIbfdname\fR, rather than |
| 269 | attempting to deduce it. |
| 270 | .Ip "\f(CW-O \fIbfdname\fR\fR" 4 |
| 271 | .Ip "\f(CW--output-target=\fIbfdname\fR\fR" 4 |
| 272 | Write the output file using the object format \fIbfdname\fR. |
| 273 | .Ip "\f(CW-F \fIbfdname\fR\fR" 4 |
| 274 | .Ip "\f(CW--target=\fIbfdname\fR\fR" 4 |
| 275 | Use \fIbfdname\fR as the object format for both the input and the output |
| 276 | file; i.e., simply transfer data from source to destination with no |
| 277 | translation. |
| 278 | .Ip "\f(CW-B \fIbfdarch\fR\fR" 4 |
| 279 | .Ip "\f(CW--binary-architecture=\fIbfdarch\fR\fR" 4 |
| 280 | Useful when transforming a raw binary input file into an object file. |
| 281 | In this case the output architecture can be set to \fIbfdarch\fR. This |
| 282 | option will be ignored if the input file has a known \fIbfdarch\fR. You |
| 283 | can access this binary data inside a program by referencing the special |
| 284 | symbols that are created by the conversion process. These symbols are |
| 285 | called _binary_\fIobjfile\fR_start, _binary_\fIobjfile\fR_end and |
| 286 | _binary_\fIobjfile\fR_size. e.g. you can transform a picture file into |
| 287 | an object file and then access it in your code using these symbols. |
| 288 | .Ip "\f(CW-j \fIsectionname\fR\fR" 4 |
| 289 | .Ip "\f(CW--only-section=\fIsectionname\fR\fR" 4 |
| 290 | Copy only the named section from the input file to the output file. |
| 291 | This option may be given more than once. Note that using this option |
| 292 | inappropriately may make the output file unusable. |
| 293 | .Ip "\f(CW-R \fIsectionname\fR\fR" 4 |
| 294 | .Ip "\f(CW--remove-section=\fIsectionname\fR\fR" 4 |
| 295 | Remove any section named \fIsectionname\fR from the output file. This |
| 296 | option may be given more than once. Note that using this option |
| 297 | inappropriately may make the output file unusable. |
| 298 | .Ip "\f(CW-S\fR" 4 |
| 299 | .Ip "\f(CW--strip-all\fR" 4 |
| 300 | Do not copy relocation and symbol information from the source file. |
| 301 | .Ip "\f(CW-g\fR" 4 |
| 302 | .Ip "\f(CW--strip-debug\fR" 4 |
| 303 | Do not copy debugging symbols from the source file. |
| 304 | .Ip "\f(CW--strip-unneeded\fR" 4 |
| 305 | Strip all symbols that are not needed for relocation processing. |
| 306 | .Ip "\f(CW-K \fIsymbolname\fR\fR" 4 |
| 307 | .Ip "\f(CW--keep-symbol=\fIsymbolname\fR\fR" 4 |
| 308 | Copy only symbol \fIsymbolname\fR from the source file. This option may |
| 309 | be given more than once. |
| 310 | .Ip "\f(CW-N \fIsymbolname\fR\fR" 4 |
| 311 | .Ip "\f(CW--strip-symbol=\fIsymbolname\fR\fR" 4 |
| 312 | Do not copy symbol \fIsymbolname\fR from the source file. This option |
| 313 | may be given more than once. |
| 314 | .Ip "\f(CW-L \fIsymbolname\fR\fR" 4 |
| 315 | .Ip "\f(CW--localize-symbol=\fIsymbolname\fR\fR" 4 |
| 316 | Make symbol \fIsymbolname\fR local to the file, so that it is not |
| 317 | visible externally. This option may be given more than once. |
| 318 | .Ip "\f(CW-W \fIsymbolname\fR\fR" 4 |
| 319 | .Ip "\f(CW--weaken-symbol=\fIsymbolname\fR\fR" 4 |
| 320 | Make symbol \fIsymbolname\fR weak. This option may be given more than once. |
| 321 | .Ip "\f(CW-x\fR" 4 |
| 322 | .Ip "\f(CW--discard-all\fR" 4 |
| 323 | Do not copy non-global symbols from the source file. |
| 324 | .Ip "\f(CW-X\fR" 4 |
| 325 | .Ip "\f(CW--discard-locals\fR" 4 |
| 326 | Do not copy compiler-generated local symbols. |
| 327 | (These usually start with \fBL\fR or \fB.\fR.) |
| 328 | .Ip "\f(CW-b \fIbyte\fR\fR" 4 |
| 329 | .Ip "\f(CW--byte=\fIbyte\fR\fR" 4 |
| 330 | Keep only every \fIbyte\fRth byte of the input file (header data is not |
| 331 | affected). \fIbyte\fR can be in the range from 0 to \fIinterleave\fR\-1, |
| 332 | where \fIinterleave\fR is given by the \fB\-i\fR or \fB--interleave\fR |
| 333 | option, or the default of 4. This option is useful for creating files |
| 334 | to program \s-1ROM\s0. It is typically used with an \f(CWsrec\fR output |
| 335 | target. |
| 336 | .Ip "\f(CW-i \fIinterleave\fR\fR" 4 |
| 337 | .Ip "\f(CW--interleave=\fIinterleave\fR\fR" 4 |
| 338 | Only copy one out of every \fIinterleave\fR bytes. Select which byte to |
| 339 | copy with the \fI\-b\fR or \fB--byte\fR option. The default is 4. |
| 340 | \f(CWobjcopy\fR ignores this option if you do not specify either \fB\-b\fR or |
| 341 | \fB--byte\fR. |
| 342 | .Ip "\f(CW-p\fR" 4 |
| 343 | .Ip "\f(CW--preserve-dates\fR" 4 |
| 344 | Set the access and modification dates of the output file to be the same |
| 345 | as those of the input file. |
| 346 | .Ip "\f(CW--debugging\fR" 4 |
| 347 | Convert debugging information, if possible. This is not the default |
| 348 | because only certain debugging formats are supported, and the |
| 349 | conversion process can be time consuming. |
| 350 | .Ip "\f(CW--gap-fill \fIval\fR\fR" 4 |
| 351 | Fill gaps between sections with \fIval\fR. This operation applies to |
| 352 | the \fIload address\fR (\s-1LMA\s0) of the sections. It is done by increasing |
| 353 | the size of the section with the lower address, and filling in the extra |
| 354 | space created with \fIval\fR. |
| 355 | .Ip "\f(CW--pad-to \fIaddress\fR\fR" 4 |
| 356 | Pad the output file up to the load address \fIaddress\fR. This is |
| 357 | done by increasing the size of the last section. The extra space is |
| 358 | filled in with the value specified by \fB--gap-fill\fR (default zero). |
| 359 | .Ip "\f(CW--set-start \fIval\fR\fR" 4 |
| 360 | Set the start address of the new file to \fIval\fR. Not all object file |
| 361 | formats support setting the start address. |
| 362 | .Ip "\f(CW--change-start \fIincr\fR\fR" 4 |
| 363 | .Ip "\f(CW--adjust-start \fIincr\fR\fR" 4 |
| 364 | Change the start address by adding \fIincr\fR. Not all object file |
| 365 | formats support setting the start address. |
| 366 | .Ip "\f(CW--change-addresses \fIincr\fR\fR" 4 |
| 367 | .Ip "\f(CW--adjust-vma \fIincr\fR\fR" 4 |
| 368 | Change the \s-1VMA\s0 and \s-1LMA\s0 addresses of all sections, as well as the start |
| 369 | address, by adding \fIincr\fR. Some object file formats do not permit |
| 370 | section addresses to be changed arbitrarily. Note that this does not |
| 371 | relocate the sections; if the program expects sections to be loaded at a |
| 372 | certain address, and this option is used to change the sections such |
| 373 | that they are loaded at a different address, the program may fail. |
| 374 | .Ip "\f(CW--change-section-address \fIsection\fR{=,+,-}\fIval\fR\fR" 4 |
| 375 | .Ip "\f(CW--adjust-section-vma \fIsection\fR{=,+,-}\fIval\fR\fR" 4 |
| 376 | Set or change both the \s-1VMA\s0 address and the \s-1LMA\s0 address of the named |
| 377 | \fIsection\fR. If \fB=\fR is used, the section address is set to |
| 378 | \fIval\fR. Otherwise, \fIval\fR is added to or subtracted from the |
| 379 | section address. See the comments under \fB--change-addresses\fR, |
| 380 | above. If \fIsection\fR does not exist in the input file, a warning will |
| 381 | be issued, unless \fB--no-change-warnings\fR is used. |
| 382 | .Ip "\f(CW--change-section-lma \fIsection\fR{=,+,-}\fIval\fR\fR" 4 |
| 383 | Set or change the \s-1LMA\s0 address of the named \fIsection\fR. The \s-1LMA\s0 |
| 384 | address is the address where the section will be loaded into memory at |
| 385 | program load time. Normally this is the same as the \s-1VMA\s0 address, which |
| 386 | is the address of the section at program run time, but on some systems, |
| 387 | especially those where a program is held in \s-1ROM\s0, the two can be |
| 388 | different. If \fB=\fR is used, the section address is set to |
| 389 | \fIval\fR. Otherwise, \fIval\fR is added to or subtracted from the |
| 390 | section address. See the comments under \fB--change-addresses\fR, |
| 391 | above. If \fIsection\fR does not exist in the input file, a warning |
| 392 | will be issued, unless \fB--no-change-warnings\fR is used. |
| 393 | .Ip "\f(CW--change-section-vma \fIsection\fR{=,+,-}\fIval\fR\fR" 4 |
| 394 | Set or change the \s-1VMA\s0 address of the named \fIsection\fR. The \s-1VMA\s0 |
| 395 | address is the address where the section will be located once the |
| 396 | program has started executing. Normally this is the same as the \s-1LMA\s0 |
| 397 | address, which is the address where the section will be loaded into |
| 398 | memory, but on some systems, especially those where a program is held in |
| 399 | \s-1ROM\s0, the two can be different. If \fB=\fR is used, the section address |
| 400 | is set to \fIval\fR. Otherwise, \fIval\fR is added to or subtracted |
| 401 | from the section address. See the comments under |
| 402 | \fB--change-addresses\fR, above. If \fIsection\fR does not exist in |
| 403 | the input file, a warning will be issued, unless |
| 404 | \fB--no-change-warnings\fR is used. |
| 405 | .Ip "\f(CW--change-warnings\fR" 4 |
| 406 | .Ip "\f(CW--adjust-warnings\fR" 4 |
| 407 | If \fB--change-section-address\fR or \fB--change-section-lma\fR or |
| 408 | \fB--change-section-vma\fR is used, and the named section does not |
| 409 | exist, issue a warning. This is the default. |
| 410 | .Ip "\f(CW--no-change-warnings\fR" 4 |
| 411 | .Ip "\f(CW--no-adjust-warnings\fR" 4 |
| 412 | Do not issue a warning if \fB--change-section-address\fR or |
| 413 | \fB--adjust-section-lma\fR or \fB--adjust-section-vma\fR is used, even |
| 414 | if the named section does not exist. |
| 415 | .Ip "\f(CW--set-section-flags \fIsection\fR=\fIflags\fR\fR" 4 |
| 416 | Set the flags for the named section. The \fIflags\fR argument is a |
| 417 | comma separated string of flag names. The recognized names are |
| 418 | \fBalloc\fR, \fBcontents\fR, \fBload\fR, \fBnoload\fR, |
| 419 | \fBreadonly\fR, \fBcode\fR, \fBdata\fR, \fBrom\fR, \fBshare\fR, and |
| 420 | \fBdebug\fR. You can set the \fBcontents\fR flag for a section which |
| 421 | does not have contents, but it is not meaningful to clear the |
| 422 | \fBcontents\fR flag of a section which does have contents\*(--just remove |
| 423 | the section instead. Not all flags are meaningful for all object file |
| 424 | formats. |
| 425 | .Ip "\f(CW--add-section \fIsectionname\fR=\fIfilename\fR\fR" 4 |
| 426 | Add a new section named \fIsectionname\fR while copying the file. The |
| 427 | contents of the new section are taken from the file \fIfilename\fR. The |
| 428 | size of the section will be the size of the file. This option only |
| 429 | works on file formats which can support sections with arbitrary names. |
| 430 | .Ip "\f(CW--change-leading-char\fR" 4 |
| 431 | Some object file formats use special characters at the start of |
| 432 | symbols. The most common such character is underscore, which compilers |
| 433 | often add before every symbol. This option tells \f(CWobjcopy\fR to |
| 434 | change the leading character of every symbol when it converts between |
| 435 | object file formats. If the object file formats use the same leading |
| 436 | character, this option has no effect. Otherwise, it will add a |
| 437 | character, or remove a character, or change a character, as |
| 438 | appropriate. |
| 439 | .Ip "\f(CW--remove-leading-char\fR" 4 |
| 440 | If the first character of a global symbol is a special symbol leading |
| 441 | character used by the object file format, remove the character. The |
| 442 | most common symbol leading character is underscore. This option will |
| 443 | remove a leading underscore from all global symbols. This can be useful |
| 444 | if you want to link together objects of different file formats with |
| 445 | different conventions for symbol names. This is different from |
| 446 | \f(CW--change-leading-char\fR because it always changes the symbol name |
| 447 | when appropriate, regardless of the object file format of the output |
| 448 | file. |
| 449 | .Ip "\f(CW--srec-len=\fIival\fR\fR" 4 |
| 450 | Meaningful only for srec output. Set the maximum length of the Srecords |
| 451 | being produced to \fIival\fR. This length covers both address, data and |
| 452 | crc fields. |
| 453 | .Ip "\f(CW--srec-forceS3\fR" 4 |
| 454 | Meaningful only for srec output. Avoid generation of S1/S2 records, |
| 455 | creating S3-only record format. |
| 456 | .Ip "\f(CW--redefine-sym \fIold\fR=\fInew\fR\fR" 4 |
| 457 | Change the name of a symbol \fIold\fR, to \fInew\fR. This can be useful |
| 458 | when one is trying link two things together for which you have no |
| 459 | source, and there are name collisions. |
| 460 | .Ip "\f(CW--weaken\fR" 4 |
| 461 | Change all global symbols in the file to be weak. This can be useful |
| 462 | when building an object which will be linked against other objects using |
| 463 | the \f(CW-R\fR option to the linker. This option is only effective when |
| 464 | using an object file format which supports weak symbols. |
| 465 | .Ip "\f(CW-V\fR" 4 |
| 466 | .Ip "\f(CW--version\fR" 4 |
| 467 | Show the version number of \f(CWobjcopy\fR. |
| 468 | .Ip "\f(CW-v\fR" 4 |
| 469 | .Ip "\f(CW--verbose\fR" 4 |
| 470 | Verbose output: list all object files modified. In the case of |
| 471 | archives, \fBobjcopy \-V\fR lists all members of the archive. |
| 472 | .Ip "\f(CW--help\fR" 4 |
| 473 | Show a summary of the options to \f(CWobjcopy\fR. |
| 474 | .SH "SEE ALSO" |
| 475 | \fIld\fR\|(1), \fIobjdump\fR\|(1), and the Info entries for \fIbinutils\fR. |
| 476 | .SH "COPYRIGHT" |
| 477 | Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. |
| 478 | .PP |
| 479 | Permission is granted to copy, distribute and/or modify this document |
| 480 | under the terms of the GNU Free Documentation License, Version 1.1 |
| 481 | or any later version published by the Free Software Foundation; |
| 482 | with no Invariant Sections, with no Front-Cover Texts, and with no |
| 483 | Back-Cover Texts. A copy of the license is included in the |
| 484 | section entitled \*(L"GNU Free Documentation License\*(R". |
| 485 | |
| 486 | .rn }` '' |
| 487 | .IX Title "OBJCOPY.1 1" |
| 488 | .IX Name "objcopy - copy and translate object files" |
| 489 | |
| 490 | .IX Header "NAME" |
| 491 | |
| 492 | .IX Header "SYNOPSIS" |
| 493 | |
| 494 | .IX Header "DESCRIPTION" |
| 495 | |
| 496 | .IX Header "OPTIONS" |
| 497 | |
| 498 | .IX Item "\f(CW\fIinfile\fR\fR" |
| 499 | |
| 500 | .IX Item "\f(CW\fIoutfile\fR\fR" |
| 501 | |
| 502 | .IX Item "\f(CW-I \fIbfdname\fR \fR" |
| 503 | |
| 504 | .IX Item "\f(CW--input-target=\fIbfdname\fR\fR" |
| 505 | |
| 506 | .IX Item "\f(CW-O \fIbfdname\fR\fR" |
| 507 | |
| 508 | .IX Item "\f(CW--output-target=\fIbfdname\fR\fR" |
| 509 | |
| 510 | .IX Item "\f(CW-F \fIbfdname\fR\fR" |
| 511 | |
| 512 | .IX Item "\f(CW--target=\fIbfdname\fR\fR" |
| 513 | |
| 514 | .IX Item "\f(CW-B \fIbfdarch\fR\fR" |
| 515 | |
| 516 | .IX Item "\f(CW--binary-architecture=\fIbfdarch\fR\fR" |
| 517 | |
| 518 | .IX Item "\f(CW-j \fIsectionname\fR\fR" |
| 519 | |
| 520 | .IX Item "\f(CW--only-section=\fIsectionname\fR\fR" |
| 521 | |
| 522 | .IX Item "\f(CW-R \fIsectionname\fR\fR" |
| 523 | |
| 524 | .IX Item "\f(CW--remove-section=\fIsectionname\fR\fR" |
| 525 | |
| 526 | .IX Item "\f(CW-S\fR" |
| 527 | |
| 528 | .IX Item "\f(CW--strip-all\fR" |
| 529 | |
| 530 | .IX Item "\f(CW-g\fR" |
| 531 | |
| 532 | .IX Item "\f(CW--strip-debug\fR" |
| 533 | |
| 534 | .IX Item "\f(CW--strip-unneeded\fR" |
| 535 | |
| 536 | .IX Item "\f(CW-K \fIsymbolname\fR\fR" |
| 537 | |
| 538 | .IX Item "\f(CW--keep-symbol=\fIsymbolname\fR\fR" |
| 539 | |
| 540 | .IX Item "\f(CW-N \fIsymbolname\fR\fR" |
| 541 | |
| 542 | .IX Item "\f(CW--strip-symbol=\fIsymbolname\fR\fR" |
| 543 | |
| 544 | .IX Item "\f(CW-L \fIsymbolname\fR\fR" |
| 545 | |
| 546 | .IX Item "\f(CW--localize-symbol=\fIsymbolname\fR\fR" |
| 547 | |
| 548 | .IX Item "\f(CW-W \fIsymbolname\fR\fR" |
| 549 | |
| 550 | .IX Item "\f(CW--weaken-symbol=\fIsymbolname\fR\fR" |
| 551 | |
| 552 | .IX Item "\f(CW-x\fR" |
| 553 | |
| 554 | .IX Item "\f(CW--discard-all\fR" |
| 555 | |
| 556 | .IX Item "\f(CW-X\fR" |
| 557 | |
| 558 | .IX Item "\f(CW--discard-locals\fR" |
| 559 | |
| 560 | .IX Item "\f(CW-b \fIbyte\fR\fR" |
| 561 | |
| 562 | .IX Item "\f(CW--byte=\fIbyte\fR\fR" |
| 563 | |
| 564 | .IX Item "\f(CW-i \fIinterleave\fR\fR" |
| 565 | |
| 566 | .IX Item "\f(CW--interleave=\fIinterleave\fR\fR" |
| 567 | |
| 568 | .IX Item "\f(CW-p\fR" |
| 569 | |
| 570 | .IX Item "\f(CW--preserve-dates\fR" |
| 571 | |
| 572 | .IX Item "\f(CW--debugging\fR" |
| 573 | |
| 574 | .IX Item "\f(CW--gap-fill \fIval\fR\fR" |
| 575 | |
| 576 | .IX Item "\f(CW--pad-to \fIaddress\fR\fR" |
| 577 | |
| 578 | .IX Item "\f(CW--set-start \fIval\fR\fR" |
| 579 | |
| 580 | .IX Item "\f(CW--change-start \fIincr\fR\fR" |
| 581 | |
| 582 | .IX Item "\f(CW--adjust-start \fIincr\fR\fR" |
| 583 | |
| 584 | .IX Item "\f(CW--change-addresses \fIincr\fR\fR" |
| 585 | |
| 586 | .IX Item "\f(CW--adjust-vma \fIincr\fR\fR" |
| 587 | |
| 588 | .IX Item "\f(CW--change-section-address \fIsection\fR{=,+,-}\fIval\fR\fR" |
| 589 | |
| 590 | .IX Item "\f(CW--adjust-section-vma \fIsection\fR{=,+,-}\fIval\fR\fR" |
| 591 | |
| 592 | .IX Item "\f(CW--change-section-lma \fIsection\fR{=,+,-}\fIval\fR\fR" |
| 593 | |
| 594 | .IX Item "\f(CW--change-section-vma \fIsection\fR{=,+,-}\fIval\fR\fR" |
| 595 | |
| 596 | .IX Item "\f(CW--change-warnings\fR" |
| 597 | |
| 598 | .IX Item "\f(CW--adjust-warnings\fR" |
| 599 | |
| 600 | .IX Item "\f(CW--no-change-warnings\fR" |
| 601 | |
| 602 | .IX Item "\f(CW--no-adjust-warnings\fR" |
| 603 | |
| 604 | .IX Item "\f(CW--set-section-flags \fIsection\fR=\fIflags\fR\fR" |
| 605 | |
| 606 | .IX Item "\f(CW--add-section \fIsectionname\fR=\fIfilename\fR\fR" |
| 607 | |
| 608 | .IX Item "\f(CW--change-leading-char\fR" |
| 609 | |
| 610 | .IX Item "\f(CW--remove-leading-char\fR" |
| 611 | |
| 612 | .IX Item "\f(CW--srec-len=\fIival\fR\fR" |
| 613 | |
| 614 | .IX Item "\f(CW--srec-forceS3\fR" |
| 615 | |
| 616 | .IX Item "\f(CW--redefine-sym \fIold\fR=\fInew\fR\fR" |
| 617 | |
| 618 | .IX Item "\f(CW--weaken\fR" |
| 619 | |
| 620 | .IX Item "\f(CW-V\fR" |
| 621 | |
| 622 | .IX Item "\f(CW--version\fR" |
| 623 | |
| 624 | .IX Item "\f(CW-v\fR" |
| 625 | |
| 626 | .IX Item "\f(CW--verbose\fR" |
| 627 | |
| 628 | .IX Item "\f(CW--help\fR" |
| 629 | |
| 630 | .IX Header "SEE ALSO" |
| 631 | |
| 632 | .IX Header "COPYRIGHT" |
| 633 | |