aarch64-none-linux-gnu-objcopy.1 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237
  1. .\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
  2. .\"
  3. .\" Standard preamble:
  4. .\" ========================================================================
  5. .de Sp \" Vertical space (when we can't use .PP)
  6. .if t .sp .5v
  7. .if n .sp
  8. ..
  9. .de Vb \" Begin verbatim text
  10. .ft CW
  11. .nf
  12. .ne \\$1
  13. ..
  14. .de Ve \" End verbatim text
  15. .ft R
  16. .fi
  17. ..
  18. .\" Set up some character translations and predefined strings. \*(-- will
  19. .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
  20. .\" double quote, and \*(R" will give a right double quote. \*(C+ will
  21. .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
  22. .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
  23. .\" nothing in troff, for use with C<>.
  24. .tr \(*W-
  25. .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
  26. .ie n \{\
  27. . ds -- \(*W-
  28. . ds PI pi
  29. . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
  30. . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
  31. . ds L" ""
  32. . ds R" ""
  33. . ds C` ""
  34. . ds C' ""
  35. 'br\}
  36. .el\{\
  37. . ds -- \|\(em\|
  38. . ds PI \(*p
  39. . ds L" ``
  40. . ds R" ''
  41. . ds C`
  42. . ds C'
  43. 'br\}
  44. .\"
  45. .\" Escape single quotes in literal strings from groff's Unicode transform.
  46. .ie \n(.g .ds Aq \(aq
  47. .el .ds Aq '
  48. .\"
  49. .\" If the F register is >0, we'll generate index entries on stderr for
  50. .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
  51. .\" entries marked with X<> in POD. Of course, you'll have to process the
  52. .\" output yourself in some meaningful fashion.
  53. .\"
  54. .\" Avoid warning from groff about undefined register 'F'.
  55. .de IX
  56. ..
  57. .if !\nF .nr F 0
  58. .if \nF>0 \{\
  59. . de IX
  60. . tm Index:\\$1\t\\n%\t"\\$2"
  61. ..
  62. . if !\nF==2 \{\
  63. . nr % 0
  64. . nr F 2
  65. . \}
  66. .\}
  67. .\"
  68. .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
  69. .\" Fear. Run. Save yourself. No user-serviceable parts.
  70. . \" fudge factors for nroff and troff
  71. .if n \{\
  72. . ds #H 0
  73. . ds #V .8m
  74. . ds #F .3m
  75. . ds #[ \f1
  76. . ds #] \fP
  77. .\}
  78. .if t \{\
  79. . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
  80. . ds #V .6m
  81. . ds #F 0
  82. . ds #[ \&
  83. . ds #] \&
  84. .\}
  85. . \" simple accents for nroff and troff
  86. .if n \{\
  87. . ds ' \&
  88. . ds ` \&
  89. . ds ^ \&
  90. . ds , \&
  91. . ds ~ ~
  92. . ds /
  93. .\}
  94. .if t \{\
  95. . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
  96. . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
  97. . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
  98. . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
  99. . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
  100. . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
  101. .\}
  102. . \" troff and (daisy-wheel) nroff accents
  103. .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
  104. .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
  105. .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
  106. .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
  107. .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
  108. .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
  109. .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
  110. .ds ae a\h'-(\w'a'u*4/10)'e
  111. .ds Ae A\h'-(\w'A'u*4/10)'E
  112. . \" corrections for vroff
  113. .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
  114. .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
  115. . \" for low resolution devices (crt and lpr)
  116. .if \n(.H>23 .if \n(.V>19 \
  117. \{\
  118. . ds : e
  119. . ds 8 ss
  120. . ds o a
  121. . ds d- d\h'-1'\(ga
  122. . ds D- D\h'-1'\(hy
  123. . ds th \o'bp'
  124. . ds Th \o'LP'
  125. . ds ae ae
  126. . ds Ae AE
  127. .\}
  128. .rm #[ #] #H #V #F C
  129. .\" ========================================================================
  130. .\"
  131. .IX Title "OBJCOPY 1"
  132. .TH OBJCOPY 1 "2021-07-02" "binutils-2.36.1" "GNU Development Tools"
  133. .\" For nroff, turn off justification. Always turn off hyphenation; it makes
  134. .\" way too many mistakes in technical documents.
  135. .if n .ad l
  136. .nh
  137. .SH "NAME"
  138. objcopy \- copy and translate object files
  139. .SH "SYNOPSIS"
  140. .IX Header "SYNOPSIS"
  141. objcopy [\fB\-F\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR]
  142. [\fB\-I\fR \fIbfdname\fR|\fB\-\-input\-target=\fR\fIbfdname\fR]
  143. [\fB\-O\fR \fIbfdname\fR|\fB\-\-output\-target=\fR\fIbfdname\fR]
  144. [\fB\-B\fR \fIbfdarch\fR|\fB\-\-binary\-architecture=\fR\fIbfdarch\fR]
  145. [\fB\-S\fR|\fB\-\-strip\-all\fR]
  146. [\fB\-g\fR|\fB\-\-strip\-debug\fR]
  147. [\fB\-\-strip\-unneeded\fR]
  148. [\fB\-K\fR \fIsymbolname\fR|\fB\-\-keep\-symbol=\fR\fIsymbolname\fR]
  149. [\fB\-N\fR \fIsymbolname\fR|\fB\-\-strip\-symbol=\fR\fIsymbolname\fR]
  150. [\fB\-\-strip\-unneeded\-symbol=\fR\fIsymbolname\fR]
  151. [\fB\-G\fR \fIsymbolname\fR|\fB\-\-keep\-global\-symbol=\fR\fIsymbolname\fR]
  152. [\fB\-\-localize\-hidden\fR]
  153. [\fB\-L\fR \fIsymbolname\fR|\fB\-\-localize\-symbol=\fR\fIsymbolname\fR]
  154. [\fB\-\-globalize\-symbol=\fR\fIsymbolname\fR]
  155. [\fB\-\-globalize\-symbols=\fR\fIfilename\fR]
  156. [\fB\-W\fR \fIsymbolname\fR|\fB\-\-weaken\-symbol=\fR\fIsymbolname\fR]
  157. [\fB\-w\fR|\fB\-\-wildcard\fR]
  158. [\fB\-x\fR|\fB\-\-discard\-all\fR]
  159. [\fB\-X\fR|\fB\-\-discard\-locals\fR]
  160. [\fB\-b\fR \fIbyte\fR|\fB\-\-byte=\fR\fIbyte\fR]
  161. [\fB\-i\fR [\fIbreadth\fR]|\fB\-\-interleave\fR[=\fIbreadth\fR]]
  162. [\fB\-\-interleave\-width=\fR\fIwidth\fR]
  163. [\fB\-j\fR \fIsectionpattern\fR|\fB\-\-only\-section=\fR\fIsectionpattern\fR]
  164. [\fB\-R\fR \fIsectionpattern\fR|\fB\-\-remove\-section=\fR\fIsectionpattern\fR]
  165. [\fB\-\-keep\-section=\fR\fIsectionpattern\fR]
  166. [\fB\-\-remove\-relocations=\fR\fIsectionpattern\fR]
  167. [\fB\-p\fR|\fB\-\-preserve\-dates\fR]
  168. [\fB\-D\fR|\fB\-\-enable\-deterministic\-archives\fR]
  169. [\fB\-U\fR|\fB\-\-disable\-deterministic\-archives\fR]
  170. [\fB\-\-debugging\fR]
  171. [\fB\-\-gap\-fill=\fR\fIval\fR]
  172. [\fB\-\-pad\-to=\fR\fIaddress\fR]
  173. [\fB\-\-set\-start=\fR\fIval\fR]
  174. [\fB\-\-adjust\-start=\fR\fIincr\fR]
  175. [\fB\-\-change\-addresses=\fR\fIincr\fR]
  176. [\fB\-\-change\-section\-address\fR \fIsectionpattern\fR{=,+,\-}\fIval\fR]
  177. [\fB\-\-change\-section\-lma\fR \fIsectionpattern\fR{=,+,\-}\fIval\fR]
  178. [\fB\-\-change\-section\-vma\fR \fIsectionpattern\fR{=,+,\-}\fIval\fR]
  179. [\fB\-\-change\-warnings\fR] [\fB\-\-no\-change\-warnings\fR]
  180. [\fB\-\-set\-section\-flags\fR \fIsectionpattern\fR=\fIflags\fR]
  181. [\fB\-\-set\-section\-alignment\fR \fIsectionpattern\fR=\fIalign\fR]
  182. [\fB\-\-add\-section\fR \fIsectionname\fR=\fIfilename\fR]
  183. [\fB\-\-dump\-section\fR \fIsectionname\fR=\fIfilename\fR]
  184. [\fB\-\-update\-section\fR \fIsectionname\fR=\fIfilename\fR]
  185. [\fB\-\-rename\-section\fR \fIoldname\fR=\fInewname\fR[,\fIflags\fR]]
  186. [\fB\-\-long\-section\-names\fR {enable,disable,keep}]
  187. [\fB\-\-change\-leading\-char\fR] [\fB\-\-remove\-leading\-char\fR]
  188. [\fB\-\-reverse\-bytes=\fR\fInum\fR]
  189. [\fB\-\-srec\-len=\fR\fIival\fR] [\fB\-\-srec\-forceS3\fR]
  190. [\fB\-\-redefine\-sym\fR \fIold\fR=\fInew\fR]
  191. [\fB\-\-redefine\-syms=\fR\fIfilename\fR]
  192. [\fB\-\-weaken\fR]
  193. [\fB\-\-keep\-symbols=\fR\fIfilename\fR]
  194. [\fB\-\-strip\-symbols=\fR\fIfilename\fR]
  195. [\fB\-\-strip\-unneeded\-symbols=\fR\fIfilename\fR]
  196. [\fB\-\-keep\-global\-symbols=\fR\fIfilename\fR]
  197. [\fB\-\-localize\-symbols=\fR\fIfilename\fR]
  198. [\fB\-\-weaken\-symbols=\fR\fIfilename\fR]
  199. [\fB\-\-add\-symbol\fR \fIname\fR=[\fIsection\fR:]\fIvalue\fR[,\fIflags\fR]]
  200. [\fB\-\-alt\-machine\-code=\fR\fIindex\fR]
  201. [\fB\-\-prefix\-symbols=\fR\fIstring\fR]
  202. [\fB\-\-prefix\-sections=\fR\fIstring\fR]
  203. [\fB\-\-prefix\-alloc\-sections=\fR\fIstring\fR]
  204. [\fB\-\-add\-gnu\-debuglink=\fR\fIpath-to-file\fR]
  205. [\fB\-\-keep\-file\-symbols\fR]
  206. [\fB\-\-only\-keep\-debug\fR]
  207. [\fB\-\-strip\-dwo\fR]
  208. [\fB\-\-extract\-dwo\fR]
  209. [\fB\-\-extract\-symbol\fR]
  210. [\fB\-\-writable\-text\fR]
  211. [\fB\-\-readonly\-text\fR]
  212. [\fB\-\-pure\fR]
  213. [\fB\-\-impure\fR]
  214. [\fB\-\-file\-alignment=\fR\fInum\fR]
  215. [\fB\-\-heap=\fR\fIsize\fR]
  216. [\fB\-\-image\-base=\fR\fIaddress\fR]
  217. [\fB\-\-section\-alignment=\fR\fInum\fR]
  218. [\fB\-\-stack=\fR\fIsize\fR]
  219. [\fB\-\-subsystem=\fR\fIwhich\fR:\fImajor\fR.\fIminor\fR]
  220. [\fB\-\-compress\-debug\-sections\fR]
  221. [\fB\-\-decompress\-debug\-sections\fR]
  222. [\fB\-\-elf\-stt\-common=\fR\fIval\fR]
  223. [\fB\-\-merge\-notes\fR]
  224. [\fB\-\-no\-merge\-notes\fR]
  225. [\fB\-\-verilog\-data\-width=\fR\fIval\fR]
  226. [\fB\-v\fR|\fB\-\-verbose\fR]
  227. [\fB\-V\fR|\fB\-\-version\fR]
  228. [\fB\-\-help\fR] [\fB\-\-info\fR]
  229. \fIinfile\fR [\fIoutfile\fR]
  230. .SH "DESCRIPTION"
  231. .IX Header "DESCRIPTION"
  232. The \s-1GNU\s0 \fBobjcopy\fR utility copies the contents of an object
  233. file to another. \fBobjcopy\fR uses the \s-1GNU BFD\s0 Library to
  234. read and write the object files. It can write the destination object
  235. file in a format different from that of the source object file. The
  236. exact behavior of \fBobjcopy\fR is controlled by command-line options.
  237. Note that \fBobjcopy\fR should be able to copy a fully linked file
  238. between any two formats. However, copying a relocatable object file
  239. between any two formats may not work as expected.
  240. .PP
  241. \&\fBobjcopy\fR creates temporary files to do its translations and
  242. deletes them afterward. \fBobjcopy\fR uses \s-1BFD\s0 to do all its
  243. translation work; it has access to all the formats described in \s-1BFD\s0
  244. and thus is able to recognize most formats without being told
  245. explicitly.
  246. .PP
  247. \&\fBobjcopy\fR can be used to generate S\-records by using an output
  248. target of \fBsrec\fR (e.g., use \fB\-O srec\fR).
  249. .PP
  250. \&\fBobjcopy\fR can be used to generate a raw binary file by using an
  251. output target of \fBbinary\fR (e.g., use \fB\-O binary\fR). When
  252. \&\fBobjcopy\fR generates a raw binary file, it will essentially produce
  253. a memory dump of the contents of the input object file. All symbols and
  254. relocation information will be discarded. The memory dump will start at
  255. the load address of the lowest section copied into the output file.
  256. .PP
  257. When generating an S\-record or a raw binary file, it may be helpful to
  258. use \fB\-S\fR to remove sections containing debugging information. In
  259. some cases \fB\-R\fR will be useful to remove sections which contain
  260. information that is not needed by the binary file.
  261. .PP
  262. Note\-\-\-\fBobjcopy\fR is not able to change the endianness of its input
  263. files. If the input format has an endianness (some formats do not),
  264. \&\fBobjcopy\fR can only copy the inputs into file formats that have the
  265. same endianness or which have no endianness (e.g., \fBsrec\fR).
  266. (However, see the \fB\-\-reverse\-bytes\fR option.)
  267. .SH "OPTIONS"
  268. .IX Header "OPTIONS"
  269. .IP "\fIinfile\fR" 4
  270. .IX Item "infile"
  271. .PD 0
  272. .IP "\fIoutfile\fR" 4
  273. .IX Item "outfile"
  274. .PD
  275. The input and output files, respectively.
  276. If you do not specify \fIoutfile\fR, \fBobjcopy\fR creates a
  277. temporary file and destructively renames the result with
  278. the name of \fIinfile\fR.
  279. .IP "\fB\-I\fR \fIbfdname\fR" 4
  280. .IX Item "-I bfdname"
  281. .PD 0
  282. .IP "\fB\-\-input\-target=\fR\fIbfdname\fR" 4
  283. .IX Item "--input-target=bfdname"
  284. .PD
  285. Consider the source file's object format to be \fIbfdname\fR, rather than
  286. attempting to deduce it.
  287. .IP "\fB\-O\fR \fIbfdname\fR" 4
  288. .IX Item "-O bfdname"
  289. .PD 0
  290. .IP "\fB\-\-output\-target=\fR\fIbfdname\fR" 4
  291. .IX Item "--output-target=bfdname"
  292. .PD
  293. Write the output file using the object format \fIbfdname\fR.
  294. .IP "\fB\-F\fR \fIbfdname\fR" 4
  295. .IX Item "-F bfdname"
  296. .PD 0
  297. .IP "\fB\-\-target=\fR\fIbfdname\fR" 4
  298. .IX Item "--target=bfdname"
  299. .PD
  300. Use \fIbfdname\fR as the object format for both the input and the output
  301. file; i.e., simply transfer data from source to destination with no
  302. translation.
  303. .IP "\fB\-B\fR \fIbfdarch\fR" 4
  304. .IX Item "-B bfdarch"
  305. .PD 0
  306. .IP "\fB\-\-binary\-architecture=\fR\fIbfdarch\fR" 4
  307. .IX Item "--binary-architecture=bfdarch"
  308. .PD
  309. Useful when transforming a architecture-less input file into an object file.
  310. In this case the output architecture can be set to \fIbfdarch\fR. This
  311. option will be ignored if the input file has a known \fIbfdarch\fR. You
  312. can access this binary data inside a program by referencing the special
  313. symbols that are created by the conversion process. These symbols are
  314. called _binary_\fIobjfile\fR_start, _binary_\fIobjfile\fR_end and
  315. _binary_\fIobjfile\fR_size. e.g. you can transform a picture file into
  316. an object file and then access it in your code using these symbols.
  317. .IP "\fB\-j\fR \fIsectionpattern\fR" 4
  318. .IX Item "-j sectionpattern"
  319. .PD 0
  320. .IP "\fB\-\-only\-section=\fR\fIsectionpattern\fR" 4
  321. .IX Item "--only-section=sectionpattern"
  322. .PD
  323. Copy only the indicated sections from the input file to the output file.
  324. This option may be given more than once. Note that using this option
  325. inappropriately may make the output file unusable. Wildcard
  326. characters are accepted in \fIsectionpattern\fR.
  327. .Sp
  328. If the first character of \fIsectionpattern\fR is the exclamation
  329. point (!) then matching sections will not be copied, even if earlier
  330. use of \fB\-\-only\-section\fR on the same command line would
  331. otherwise copy it. For example:
  332. .Sp
  333. .Vb 1
  334. \& \-\-only\-section=.text.* \-\-only\-section=!.text.foo
  335. .Ve
  336. .Sp
  337. will copy all sectinos matching '.text.*' but not the section
  338. \&'.text.foo'.
  339. .IP "\fB\-R\fR \fIsectionpattern\fR" 4
  340. .IX Item "-R sectionpattern"
  341. .PD 0
  342. .IP "\fB\-\-remove\-section=\fR\fIsectionpattern\fR" 4
  343. .IX Item "--remove-section=sectionpattern"
  344. .PD
  345. Remove any section matching \fIsectionpattern\fR from the output file.
  346. This option may be given more than once. Note that using this option
  347. inappropriately may make the output file unusable. Wildcard
  348. characters are accepted in \fIsectionpattern\fR. Using both the
  349. \&\fB\-j\fR and \fB\-R\fR options together results in undefined
  350. behaviour.
  351. .Sp
  352. If the first character of \fIsectionpattern\fR is the exclamation
  353. point (!) then matching sections will not be removed even if an
  354. earlier use of \fB\-\-remove\-section\fR on the same command line
  355. would otherwise remove it. For example:
  356. .Sp
  357. .Vb 1
  358. \& \-\-remove\-section=.text.* \-\-remove\-section=!.text.foo
  359. .Ve
  360. .Sp
  361. will remove all sections matching the pattern '.text.*', but will not
  362. remove the section '.text.foo'.
  363. .IP "\fB\-\-keep\-section=\fR\fIsectionpattern\fR" 4
  364. .IX Item "--keep-section=sectionpattern"
  365. When removing sections from the output file, keep sections that match
  366. \&\fIsectionpattern\fR.
  367. .IP "\fB\-\-remove\-relocations=\fR\fIsectionpattern\fR" 4
  368. .IX Item "--remove-relocations=sectionpattern"
  369. Remove non-dynamic relocations from the output file for any section
  370. matching \fIsectionpattern\fR. This option may be given more than
  371. once. Note that using this option inappropriately may make the output
  372. file unusable, and attempting to remove a dynamic relocation section
  373. such as \fB.rela.plt\fR from an executable or shared library with
  374. \&\fB\-\-remove\-relocations=.plt\fR will not work. Wildcard characters
  375. are accepted in \fIsectionpattern\fR.
  376. For example:
  377. .Sp
  378. .Vb 1
  379. \& \-\-remove\-relocations=.text.*
  380. .Ve
  381. .Sp
  382. will remove the relocations for all sections matching the pattern
  383. \&'.text.*'.
  384. .Sp
  385. If the first character of \fIsectionpattern\fR is the exclamation
  386. point (!) then matching sections will not have their relocation
  387. removed even if an earlier use of \fB\-\-remove\-relocations\fR on the
  388. same command line would otherwise cause the relocations to be removed.
  389. For example:
  390. .Sp
  391. .Vb 1
  392. \& \-\-remove\-relocations=.text.* \-\-remove\-relocations=!.text.foo
  393. .Ve
  394. .Sp
  395. will remove all relocations for sections matching the pattern
  396. \&'.text.*', but will not remove relocations for the section
  397. \&'.text.foo'.
  398. .IP "\fB\-S\fR" 4
  399. .IX Item "-S"
  400. .PD 0
  401. .IP "\fB\-\-strip\-all\fR" 4
  402. .IX Item "--strip-all"
  403. .PD
  404. Do not copy relocation and symbol information from the source file.
  405. Also deletes debug sections.
  406. .IP "\fB\-g\fR" 4
  407. .IX Item "-g"
  408. .PD 0
  409. .IP "\fB\-\-strip\-debug\fR" 4
  410. .IX Item "--strip-debug"
  411. .PD
  412. Do not copy debugging symbols or sections from the source file.
  413. .IP "\fB\-\-strip\-unneeded\fR" 4
  414. .IX Item "--strip-unneeded"
  415. Remove all symbols that are not needed for relocation processing in
  416. addition to debugging symbols and sections stripped by
  417. \&\fB\-\-strip\-debug\fR.
  418. .IP "\fB\-K\fR \fIsymbolname\fR" 4
  419. .IX Item "-K symbolname"
  420. .PD 0
  421. .IP "\fB\-\-keep\-symbol=\fR\fIsymbolname\fR" 4
  422. .IX Item "--keep-symbol=symbolname"
  423. .PD
  424. When stripping symbols, keep symbol \fIsymbolname\fR even if it would
  425. normally be stripped. This option may be given more than once.
  426. .IP "\fB\-N\fR \fIsymbolname\fR" 4
  427. .IX Item "-N symbolname"
  428. .PD 0
  429. .IP "\fB\-\-strip\-symbol=\fR\fIsymbolname\fR" 4
  430. .IX Item "--strip-symbol=symbolname"
  431. .PD
  432. Do not copy symbol \fIsymbolname\fR from the source file. This option
  433. may be given more than once.
  434. .IP "\fB\-\-strip\-unneeded\-symbol=\fR\fIsymbolname\fR" 4
  435. .IX Item "--strip-unneeded-symbol=symbolname"
  436. Do not copy symbol \fIsymbolname\fR from the source file unless it is needed
  437. by a relocation. This option may be given more than once.
  438. .IP "\fB\-G\fR \fIsymbolname\fR" 4
  439. .IX Item "-G symbolname"
  440. .PD 0
  441. .IP "\fB\-\-keep\-global\-symbol=\fR\fIsymbolname\fR" 4
  442. .IX Item "--keep-global-symbol=symbolname"
  443. .PD
  444. Keep only symbol \fIsymbolname\fR global. Make all other symbols local
  445. to the file, so that they are not visible externally. This option may
  446. be given more than once. Note: this option cannot be used in
  447. conjunction with the \fB\-\-globalize\-symbol\fR or
  448. \&\fB\-\-globalize\-symbols\fR options.
  449. .IP "\fB\-\-localize\-hidden\fR" 4
  450. .IX Item "--localize-hidden"
  451. In an \s-1ELF\s0 object, mark all symbols that have hidden or internal visibility
  452. as local. This option applies on top of symbol-specific localization options
  453. such as \fB\-L\fR.
  454. .IP "\fB\-L\fR \fIsymbolname\fR" 4
  455. .IX Item "-L symbolname"
  456. .PD 0
  457. .IP "\fB\-\-localize\-symbol=\fR\fIsymbolname\fR" 4
  458. .IX Item "--localize-symbol=symbolname"
  459. .PD
  460. Convert a global or weak symbol called \fIsymbolname\fR into a local
  461. symbol, so that it is not visible externally. This option may be
  462. given more than once. Note \- unique symbols are not converted.
  463. .IP "\fB\-W\fR \fIsymbolname\fR" 4
  464. .IX Item "-W symbolname"
  465. .PD 0
  466. .IP "\fB\-\-weaken\-symbol=\fR\fIsymbolname\fR" 4
  467. .IX Item "--weaken-symbol=symbolname"
  468. .PD
  469. Make symbol \fIsymbolname\fR weak. This option may be given more than once.
  470. .IP "\fB\-\-globalize\-symbol=\fR\fIsymbolname\fR" 4
  471. .IX Item "--globalize-symbol=symbolname"
  472. Give symbol \fIsymbolname\fR global scoping so that it is visible
  473. outside of the file in which it is defined. This option may be given
  474. more than once. Note: this option cannot be used in conjunction with
  475. the \fB\-G\fR or \fB\-\-keep\-global\-symbol\fR options.
  476. .IP "\fB\-w\fR" 4
  477. .IX Item "-w"
  478. .PD 0
  479. .IP "\fB\-\-wildcard\fR" 4
  480. .IX Item "--wildcard"
  481. .PD
  482. Permit regular expressions in \fIsymbolname\fRs used in other command
  483. line options. The question mark (?), asterisk (*), backslash (\e) and
  484. square brackets ([]) operators can be used anywhere in the symbol
  485. name. If the first character of the symbol name is the exclamation
  486. point (!) then the sense of the switch is reversed for that symbol.
  487. For example:
  488. .Sp
  489. .Vb 1
  490. \& \-w \-W !foo \-W fo*
  491. .Ve
  492. .Sp
  493. would cause objcopy to weaken all symbols that start with \*(L"fo\*(R"
  494. except for the symbol \*(L"foo\*(R".
  495. .IP "\fB\-x\fR" 4
  496. .IX Item "-x"
  497. .PD 0
  498. .IP "\fB\-\-discard\-all\fR" 4
  499. .IX Item "--discard-all"
  500. .PD
  501. Do not copy non-global symbols from the source file.
  502. .IP "\fB\-X\fR" 4
  503. .IX Item "-X"
  504. .PD 0
  505. .IP "\fB\-\-discard\-locals\fR" 4
  506. .IX Item "--discard-locals"
  507. .PD
  508. Do not copy compiler-generated local symbols.
  509. (These usually start with \fBL\fR or \fB.\fR.)
  510. .IP "\fB\-b\fR \fIbyte\fR" 4
  511. .IX Item "-b byte"
  512. .PD 0
  513. .IP "\fB\-\-byte=\fR\fIbyte\fR" 4
  514. .IX Item "--byte=byte"
  515. .PD
  516. If interleaving has been enabled via the \fB\-\-interleave\fR option
  517. then start the range of bytes to keep at the \fIbyte\fRth byte.
  518. \&\fIbyte\fR can be in the range from 0 to \fIbreadth\fR\-1, where
  519. \&\fIbreadth\fR is the value given by the \fB\-\-interleave\fR option.
  520. .IP "\fB\-i [\fR\fIbreadth\fR\fB]\fR" 4
  521. .IX Item "-i [breadth]"
  522. .PD 0
  523. .IP "\fB\-\-interleave[=\fR\fIbreadth\fR\fB]\fR" 4
  524. .IX Item "--interleave[=breadth]"
  525. .PD
  526. Only copy a range out of every \fIbreadth\fR bytes. (Header data is
  527. not affected). Select which byte in the range begins the copy with
  528. the \fB\-\-byte\fR option. Select the width of the range with the
  529. \&\fB\-\-interleave\-width\fR option.
  530. .Sp
  531. This option is useful for creating files to program \s-1ROM.\s0 It is
  532. typically used with an \f(CW\*(C`srec\*(C'\fR output target. Note that
  533. \&\fBobjcopy\fR will complain if you do not specify the
  534. \&\fB\-\-byte\fR option as well.
  535. .Sp
  536. The default interleave breadth is 4, so with \fB\-\-byte\fR set to 0,
  537. \&\fBobjcopy\fR would copy the first byte out of every four bytes
  538. from the input to the output.
  539. .IP "\fB\-\-interleave\-width=\fR\fIwidth\fR" 4
  540. .IX Item "--interleave-width=width"
  541. When used with the \fB\-\-interleave\fR option, copy \fIwidth\fR
  542. bytes at a time. The start of the range of bytes to be copied is set
  543. by the \fB\-\-byte\fR option, and the extent of the range is set with
  544. the \fB\-\-interleave\fR option.
  545. .Sp
  546. The default value for this option is 1. The value of \fIwidth\fR plus
  547. the \fIbyte\fR value set by the \fB\-\-byte\fR option must not exceed
  548. the interleave breadth set by the \fB\-\-interleave\fR option.
  549. .Sp
  550. This option can be used to create images for two 16\-bit flashes interleaved
  551. in a 32\-bit bus by passing \fB\-b 0 \-i 4 \-\-interleave\-width=2\fR
  552. and \fB\-b 2 \-i 4 \-\-interleave\-width=2\fR to two \fBobjcopy\fR
  553. commands. If the input was '12345678' then the outputs would be
  554. \&'1256' and '3478' respectively.
  555. .IP "\fB\-p\fR" 4
  556. .IX Item "-p"
  557. .PD 0
  558. .IP "\fB\-\-preserve\-dates\fR" 4
  559. .IX Item "--preserve-dates"
  560. .PD
  561. Set the access and modification dates of the output file to be the same
  562. as those of the input file.
  563. .IP "\fB\-D\fR" 4
  564. .IX Item "-D"
  565. .PD 0
  566. .IP "\fB\-\-enable\-deterministic\-archives\fR" 4
  567. .IX Item "--enable-deterministic-archives"
  568. .PD
  569. Operate in \fIdeterministic\fR mode. When copying archive members
  570. and writing the archive index, use zero for UIDs, GIDs, timestamps,
  571. and use consistent file modes for all files.
  572. .Sp
  573. If \fIbinutils\fR was configured with
  574. \&\fB\-\-enable\-deterministic\-archives\fR, then this mode is on by default.
  575. It can be disabled with the \fB\-U\fR option, below.
  576. .IP "\fB\-U\fR" 4
  577. .IX Item "-U"
  578. .PD 0
  579. .IP "\fB\-\-disable\-deterministic\-archives\fR" 4
  580. .IX Item "--disable-deterministic-archives"
  581. .PD
  582. Do \fInot\fR operate in \fIdeterministic\fR mode. This is the
  583. inverse of the \fB\-D\fR option, above: when copying archive members
  584. and writing the archive index, use their actual \s-1UID, GID,\s0 timestamp,
  585. and file mode values.
  586. .Sp
  587. This is the default unless \fIbinutils\fR was configured with
  588. \&\fB\-\-enable\-deterministic\-archives\fR.
  589. .IP "\fB\-\-debugging\fR" 4
  590. .IX Item "--debugging"
  591. Convert debugging information, if possible. This is not the default
  592. because only certain debugging formats are supported, and the
  593. conversion process can be time consuming.
  594. .IP "\fB\-\-gap\-fill\fR \fIval\fR" 4
  595. .IX Item "--gap-fill val"
  596. Fill gaps between sections with \fIval\fR. This operation applies to
  597. the \fIload address\fR (\s-1LMA\s0) of the sections. It is done by increasing
  598. the size of the section with the lower address, and filling in the extra
  599. space created with \fIval\fR.
  600. .IP "\fB\-\-pad\-to\fR \fIaddress\fR" 4
  601. .IX Item "--pad-to address"
  602. Pad the output file up to the load address \fIaddress\fR. This is
  603. done by increasing the size of the last section. The extra space is
  604. filled in with the value specified by \fB\-\-gap\-fill\fR (default zero).
  605. .IP "\fB\-\-set\-start\fR \fIval\fR" 4
  606. .IX Item "--set-start val"
  607. Set the start address (also known as the entry address) of the new
  608. file to \fIval\fR. Not all object file formats support setting the
  609. start address.
  610. .IP "\fB\-\-change\-start\fR \fIincr\fR" 4
  611. .IX Item "--change-start incr"
  612. .PD 0
  613. .IP "\fB\-\-adjust\-start\fR \fIincr\fR" 4
  614. .IX Item "--adjust-start incr"
  615. .PD
  616. Change the start address (also known as the entry address) by adding
  617. \&\fIincr\fR. Not all object file formats support setting the start
  618. address.
  619. .IP "\fB\-\-change\-addresses\fR \fIincr\fR" 4
  620. .IX Item "--change-addresses incr"
  621. .PD 0
  622. .IP "\fB\-\-adjust\-vma\fR \fIincr\fR" 4
  623. .IX Item "--adjust-vma incr"
  624. .PD
  625. Change the \s-1VMA\s0 and \s-1LMA\s0 addresses of all sections, as well as the start
  626. address, by adding \fIincr\fR. Some object file formats do not permit
  627. section addresses to be changed arbitrarily. Note that this does not
  628. relocate the sections; if the program expects sections to be loaded at a
  629. certain address, and this option is used to change the sections such
  630. that they are loaded at a different address, the program may fail.
  631. .IP "\fB\-\-change\-section\-address\fR \fIsectionpattern\fR\fB{=,+,\-}\fR\fIval\fR" 4
  632. .IX Item "--change-section-address sectionpattern{=,+,-}val"
  633. .PD 0
  634. .IP "\fB\-\-adjust\-section\-vma\fR \fIsectionpattern\fR\fB{=,+,\-}\fR\fIval\fR" 4
  635. .IX Item "--adjust-section-vma sectionpattern{=,+,-}val"
  636. .PD
  637. Set or change both the \s-1VMA\s0 address and the \s-1LMA\s0 address of any section
  638. matching \fIsectionpattern\fR. If \fB=\fR is used, the section
  639. address is set to \fIval\fR. Otherwise, \fIval\fR is added to or
  640. subtracted from the section address. See the comments under
  641. \&\fB\-\-change\-addresses\fR, above. If \fIsectionpattern\fR does not
  642. match any sections in the input file, a warning will be issued, unless
  643. \&\fB\-\-no\-change\-warnings\fR is used.
  644. .IP "\fB\-\-change\-section\-lma\fR \fIsectionpattern\fR\fB{=,+,\-}\fR\fIval\fR" 4
  645. .IX Item "--change-section-lma sectionpattern{=,+,-}val"
  646. Set or change the \s-1LMA\s0 address of any sections matching
  647. \&\fIsectionpattern\fR. The \s-1LMA\s0 address is the address where the
  648. section will be loaded into memory at program load time. Normally
  649. this is the same as the \s-1VMA\s0 address, which is the address of the
  650. section at program run time, but on some systems, especially those
  651. where a program is held in \s-1ROM,\s0 the two can be different. If \fB=\fR
  652. is used, the section address is set to \fIval\fR. Otherwise,
  653. \&\fIval\fR is added to or subtracted from the section address. See the
  654. comments under \fB\-\-change\-addresses\fR, above. If
  655. \&\fIsectionpattern\fR does not match any sections in the input file, a
  656. warning will be issued, unless \fB\-\-no\-change\-warnings\fR is used.
  657. .IP "\fB\-\-change\-section\-vma\fR \fIsectionpattern\fR\fB{=,+,\-}\fR\fIval\fR" 4
  658. .IX Item "--change-section-vma sectionpattern{=,+,-}val"
  659. Set or change the \s-1VMA\s0 address of any section matching
  660. \&\fIsectionpattern\fR. The \s-1VMA\s0 address is the address where the
  661. section will be located once the program has started executing.
  662. Normally this is the same as the \s-1LMA\s0 address, which is the address
  663. where the section will be loaded into memory, but on some systems,
  664. especially those where a program is held in \s-1ROM,\s0 the two can be
  665. different. If \fB=\fR is used, the section address is set to
  666. \&\fIval\fR. Otherwise, \fIval\fR is added to or subtracted from the
  667. section address. See the comments under \fB\-\-change\-addresses\fR,
  668. above. If \fIsectionpattern\fR does not match any sections in the
  669. input file, a warning will be issued, unless
  670. \&\fB\-\-no\-change\-warnings\fR is used.
  671. .IP "\fB\-\-change\-warnings\fR" 4
  672. .IX Item "--change-warnings"
  673. .PD 0
  674. .IP "\fB\-\-adjust\-warnings\fR" 4
  675. .IX Item "--adjust-warnings"
  676. .PD
  677. If \fB\-\-change\-section\-address\fR or \fB\-\-change\-section\-lma\fR or
  678. \&\fB\-\-change\-section\-vma\fR is used, and the section pattern does not
  679. match any sections, issue a warning. This is the default.
  680. .IP "\fB\-\-no\-change\-warnings\fR" 4
  681. .IX Item "--no-change-warnings"
  682. .PD 0
  683. .IP "\fB\-\-no\-adjust\-warnings\fR" 4
  684. .IX Item "--no-adjust-warnings"
  685. .PD
  686. Do not issue a warning if \fB\-\-change\-section\-address\fR or
  687. \&\fB\-\-adjust\-section\-lma\fR or \fB\-\-adjust\-section\-vma\fR is used, even
  688. if the section pattern does not match any sections.
  689. .IP "\fB\-\-set\-section\-flags\fR \fIsectionpattern\fR\fB=\fR\fIflags\fR" 4
  690. .IX Item "--set-section-flags sectionpattern=flags"
  691. Set the flags for any sections matching \fIsectionpattern\fR. The
  692. \&\fIflags\fR argument is a comma separated string of flag names. The
  693. recognized names are \fBalloc\fR, \fBcontents\fR, \fBload\fR,
  694. \&\fBnoload\fR, \fBreadonly\fR, \fBcode\fR, \fBdata\fR, \fBrom\fR,
  695. \&\fBexclude\fR, \fBshare\fR, and \fBdebug\fR. You can set the
  696. \&\fBcontents\fR flag for a section which does not have contents, but it
  697. is not meaningful to clear the \fBcontents\fR flag of a section which
  698. does have contents\*(--just remove the section instead. Not all flags are
  699. meaningful for all object file formats. In particular the
  700. \&\fBshare\fR flag is only meaningful for \s-1COFF\s0 format files and not for
  701. \&\s-1ELF\s0 format files.
  702. .IP "\fB\-\-set\-section\-alignment\fR \fIsectionpattern\fR\fB=\fR\fIalign\fR" 4
  703. .IX Item "--set-section-alignment sectionpattern=align"
  704. Set the alignment for any sections matching \fIsectionpattern\fR.
  705. \&\fIalign\fR specifies the alignment in bytes and must be a power of
  706. two, i.e. 1, 2, 4, 8....
  707. .IP "\fB\-\-add\-section\fR \fIsectionname\fR\fB=\fR\fIfilename\fR" 4
  708. .IX Item "--add-section sectionname=filename"
  709. Add a new section named \fIsectionname\fR while copying the file. The
  710. contents of the new section are taken from the file \fIfilename\fR. The
  711. size of the section will be the size of the file. This option only
  712. works on file formats which can support sections with arbitrary names.
  713. Note \- it may be necessary to use the \fB\-\-set\-section\-flags\fR
  714. option to set the attributes of the newly created section.
  715. .IP "\fB\-\-dump\-section\fR \fIsectionname\fR\fB=\fR\fIfilename\fR" 4
  716. .IX Item "--dump-section sectionname=filename"
  717. Place the contents of section named \fIsectionname\fR into the file
  718. \&\fIfilename\fR, overwriting any contents that may have been there
  719. previously. This option is the inverse of \fB\-\-add\-section\fR.
  720. This option is similar to the \fB\-\-only\-section\fR option except
  721. that it does not create a formatted file, it just dumps the contents
  722. as raw binary data, without applying any relocations. The option can
  723. be specified more than once.
  724. .IP "\fB\-\-update\-section\fR \fIsectionname\fR\fB=\fR\fIfilename\fR" 4
  725. .IX Item "--update-section sectionname=filename"
  726. Replace the existing contents of a section named \fIsectionname\fR
  727. with the contents of file \fIfilename\fR. The size of the section
  728. will be adjusted to the size of the file. The section flags for
  729. \&\fIsectionname\fR will be unchanged. For \s-1ELF\s0 format files the section
  730. to segment mapping will also remain unchanged, something which is not
  731. possible using \fB\-\-remove\-section\fR followed by
  732. \&\fB\-\-add\-section\fR. The option can be specified more than once.
  733. .Sp
  734. Note \- it is possible to use \fB\-\-rename\-section\fR and
  735. \&\fB\-\-update\-section\fR to both update and rename a section from one
  736. command line. In this case, pass the original section name to
  737. \&\fB\-\-update\-section\fR, and the original and new section names to
  738. \&\fB\-\-rename\-section\fR.
  739. .IP "\fB\-\-add\-symbol\fR \fIname\fR\fB=[\fR\fIsection\fR\fB:]\fR\fIvalue\fR\fB[,\fR\fIflags\fR\fB]\fR" 4
  740. .IX Item "--add-symbol name=[section:]value[,flags]"
  741. Add a new symbol named \fIname\fR while copying the file. This option may be
  742. specified multiple times. If the \fIsection\fR is given, the symbol will be
  743. associated with and relative to that section, otherwise it will be an \s-1ABS\s0
  744. symbol. Specifying an undefined section will result in a fatal error. There
  745. is no check for the value, it will be taken as specified. Symbol flags can
  746. be specified and not all flags will be meaningful for all object file
  747. formats. By default, the symbol will be global. The special flag
  748. \&'before=\fIothersym\fR' will insert the new symbol in front of the specified
  749. \&\fIothersym\fR, otherwise the symbol(s) will be added at the end of the
  750. symbol table in the order they appear.
  751. .IP "\fB\-\-rename\-section\fR \fIoldname\fR\fB=\fR\fInewname\fR\fB[,\fR\fIflags\fR\fB]\fR" 4
  752. .IX Item "--rename-section oldname=newname[,flags]"
  753. Rename a section from \fIoldname\fR to \fInewname\fR, optionally
  754. changing the section's flags to \fIflags\fR in the process. This has
  755. the advantage over using a linker script to perform the rename in that
  756. the output stays as an object file and does not become a linked
  757. executable. This option accepts the same set of flags as the
  758. \&\fB\-\-sect\-section\-flags\fR option.
  759. .Sp
  760. This option is particularly helpful when the input format is binary,
  761. since this will always create a section called .data. If for example,
  762. you wanted instead to create a section called .rodata containing binary
  763. data you could use the following command line to achieve it:
  764. .Sp
  765. .Vb 3
  766. \& objcopy \-I binary \-O <output_format> \-B <architecture> \e
  767. \& \-\-rename\-section .data=.rodata,alloc,load,readonly,data,contents \e
  768. \& <input_binary_file> <output_object_file>
  769. .Ve
  770. .IP "\fB\-\-long\-section\-names {enable,disable,keep}\fR" 4
  771. .IX Item "--long-section-names {enable,disable,keep}"
  772. Controls the handling of long section names when processing \f(CW\*(C`COFF\*(C'\fR
  773. and \f(CW\*(C`PE\-COFF\*(C'\fR object formats. The default behaviour, \fBkeep\fR,
  774. is to preserve long section names if any are present in the input file.
  775. The \fBenable\fR and \fBdisable\fR options forcibly enable or disable
  776. the use of long section names in the output object; when \fBdisable\fR
  777. is in effect, any long section names in the input object will be truncated.
  778. The \fBenable\fR option will only emit long section names if any are
  779. present in the inputs; this is mostly the same as \fBkeep\fR, but it
  780. is left undefined whether the \fBenable\fR option might force the
  781. creation of an empty string table in the output file.
  782. .IP "\fB\-\-change\-leading\-char\fR" 4
  783. .IX Item "--change-leading-char"
  784. Some object file formats use special characters at the start of
  785. symbols. The most common such character is underscore, which compilers
  786. often add before every symbol. This option tells \fBobjcopy\fR to
  787. change the leading character of every symbol when it converts between
  788. object file formats. If the object file formats use the same leading
  789. character, this option has no effect. Otherwise, it will add a
  790. character, or remove a character, or change a character, as
  791. appropriate.
  792. .IP "\fB\-\-remove\-leading\-char\fR" 4
  793. .IX Item "--remove-leading-char"
  794. If the first character of a global symbol is a special symbol leading
  795. character used by the object file format, remove the character. The
  796. most common symbol leading character is underscore. This option will
  797. remove a leading underscore from all global symbols. This can be useful
  798. if you want to link together objects of different file formats with
  799. different conventions for symbol names. This is different from
  800. \&\fB\-\-change\-leading\-char\fR because it always changes the symbol name
  801. when appropriate, regardless of the object file format of the output
  802. file.
  803. .IP "\fB\-\-reverse\-bytes=\fR\fInum\fR" 4
  804. .IX Item "--reverse-bytes=num"
  805. Reverse the bytes in a section with output contents. A section length must
  806. be evenly divisible by the value given in order for the swap to be able to
  807. take place. Reversing takes place before the interleaving is performed.
  808. .Sp
  809. This option is used typically in generating \s-1ROM\s0 images for problematic
  810. target systems. For example, on some target boards, the 32\-bit words
  811. fetched from 8\-bit ROMs are re-assembled in little-endian byte order
  812. regardless of the \s-1CPU\s0 byte order. Depending on the programming model, the
  813. endianness of the \s-1ROM\s0 may need to be modified.
  814. .Sp
  815. Consider a simple file with a section containing the following eight
  816. bytes: \f(CW12345678\fR.
  817. .Sp
  818. Using \fB\-\-reverse\-bytes=2\fR for the above example, the bytes in the
  819. output file would be ordered \f(CW21436587\fR.
  820. .Sp
  821. Using \fB\-\-reverse\-bytes=4\fR for the above example, the bytes in the
  822. output file would be ordered \f(CW43218765\fR.
  823. .Sp
  824. By using \fB\-\-reverse\-bytes=2\fR for the above example, followed by
  825. \&\fB\-\-reverse\-bytes=4\fR on the output file, the bytes in the second
  826. output file would be ordered \f(CW34127856\fR.
  827. .IP "\fB\-\-srec\-len=\fR\fIival\fR" 4
  828. .IX Item "--srec-len=ival"
  829. Meaningful only for srec output. Set the maximum length of the Srecords
  830. being produced to \fIival\fR. This length covers both address, data and
  831. crc fields.
  832. .IP "\fB\-\-srec\-forceS3\fR" 4
  833. .IX Item "--srec-forceS3"
  834. Meaningful only for srec output. Avoid generation of S1/S2 records,
  835. creating S3\-only record format.
  836. .IP "\fB\-\-redefine\-sym\fR \fIold\fR\fB=\fR\fInew\fR" 4
  837. .IX Item "--redefine-sym old=new"
  838. Change the name of a symbol \fIold\fR, to \fInew\fR. This can be useful
  839. when one is trying link two things together for which you have no
  840. source, and there are name collisions.
  841. .IP "\fB\-\-redefine\-syms=\fR\fIfilename\fR" 4
  842. .IX Item "--redefine-syms=filename"
  843. Apply \fB\-\-redefine\-sym\fR to each symbol pair "\fIold\fR \fInew\fR"
  844. listed in the file \fIfilename\fR. \fIfilename\fR is simply a flat file,
  845. with one symbol pair per line. Line comments may be introduced by the hash
  846. character. This option may be given more than once.
  847. .IP "\fB\-\-weaken\fR" 4
  848. .IX Item "--weaken"
  849. Change all global symbols in the file to be weak. This can be useful
  850. when building an object which will be linked against other objects using
  851. the \fB\-R\fR option to the linker. This option is only effective when
  852. using an object file format which supports weak symbols.
  853. .IP "\fB\-\-keep\-symbols=\fR\fIfilename\fR" 4
  854. .IX Item "--keep-symbols=filename"
  855. Apply \fB\-\-keep\-symbol\fR option to each symbol listed in the file
  856. \&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
  857. name per line. Line comments may be introduced by the hash character.
  858. This option may be given more than once.
  859. .IP "\fB\-\-strip\-symbols=\fR\fIfilename\fR" 4
  860. .IX Item "--strip-symbols=filename"
  861. Apply \fB\-\-strip\-symbol\fR option to each symbol listed in the file
  862. \&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
  863. name per line. Line comments may be introduced by the hash character.
  864. This option may be given more than once.
  865. .IP "\fB\-\-strip\-unneeded\-symbols=\fR\fIfilename\fR" 4
  866. .IX Item "--strip-unneeded-symbols=filename"
  867. Apply \fB\-\-strip\-unneeded\-symbol\fR option to each symbol listed in
  868. the file \fIfilename\fR. \fIfilename\fR is simply a flat file, with one
  869. symbol name per line. Line comments may be introduced by the hash
  870. character. This option may be given more than once.
  871. .IP "\fB\-\-keep\-global\-symbols=\fR\fIfilename\fR" 4
  872. .IX Item "--keep-global-symbols=filename"
  873. Apply \fB\-\-keep\-global\-symbol\fR option to each symbol listed in the
  874. file \fIfilename\fR. \fIfilename\fR is simply a flat file, with one
  875. symbol name per line. Line comments may be introduced by the hash
  876. character. This option may be given more than once.
  877. .IP "\fB\-\-localize\-symbols=\fR\fIfilename\fR" 4
  878. .IX Item "--localize-symbols=filename"
  879. Apply \fB\-\-localize\-symbol\fR option to each symbol listed in the file
  880. \&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
  881. name per line. Line comments may be introduced by the hash character.
  882. This option may be given more than once.
  883. .IP "\fB\-\-globalize\-symbols=\fR\fIfilename\fR" 4
  884. .IX Item "--globalize-symbols=filename"
  885. Apply \fB\-\-globalize\-symbol\fR option to each symbol listed in the file
  886. \&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
  887. name per line. Line comments may be introduced by the hash character.
  888. This option may be given more than once. Note: this option cannot be
  889. used in conjunction with the \fB\-G\fR or \fB\-\-keep\-global\-symbol\fR
  890. options.
  891. .IP "\fB\-\-weaken\-symbols=\fR\fIfilename\fR" 4
  892. .IX Item "--weaken-symbols=filename"
  893. Apply \fB\-\-weaken\-symbol\fR option to each symbol listed in the file
  894. \&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
  895. name per line. Line comments may be introduced by the hash character.
  896. This option may be given more than once.
  897. .IP "\fB\-\-alt\-machine\-code=\fR\fIindex\fR" 4
  898. .IX Item "--alt-machine-code=index"
  899. If the output architecture has alternate machine codes, use the
  900. \&\fIindex\fRth code instead of the default one. This is useful in case
  901. a machine is assigned an official code and the tool-chain adopts the
  902. new code, but other applications still depend on the original code
  903. being used. For \s-1ELF\s0 based architectures if the \fIindex\fR
  904. alternative does not exist then the value is treated as an absolute
  905. number to be stored in the e_machine field of the \s-1ELF\s0 header.
  906. .IP "\fB\-\-writable\-text\fR" 4
  907. .IX Item "--writable-text"
  908. Mark the output text as writable. This option isn't meaningful for all
  909. object file formats.
  910. .IP "\fB\-\-readonly\-text\fR" 4
  911. .IX Item "--readonly-text"
  912. Make the output text write protected. This option isn't meaningful for all
  913. object file formats.
  914. .IP "\fB\-\-pure\fR" 4
  915. .IX Item "--pure"
  916. Mark the output file as demand paged. This option isn't meaningful for all
  917. object file formats.
  918. .IP "\fB\-\-impure\fR" 4
  919. .IX Item "--impure"
  920. Mark the output file as impure. This option isn't meaningful for all
  921. object file formats.
  922. .IP "\fB\-\-prefix\-symbols=\fR\fIstring\fR" 4
  923. .IX Item "--prefix-symbols=string"
  924. Prefix all symbols in the output file with \fIstring\fR.
  925. .IP "\fB\-\-prefix\-sections=\fR\fIstring\fR" 4
  926. .IX Item "--prefix-sections=string"
  927. Prefix all section names in the output file with \fIstring\fR.
  928. .IP "\fB\-\-prefix\-alloc\-sections=\fR\fIstring\fR" 4
  929. .IX Item "--prefix-alloc-sections=string"
  930. Prefix all the names of all allocated sections in the output file with
  931. \&\fIstring\fR.
  932. .IP "\fB\-\-add\-gnu\-debuglink=\fR\fIpath-to-file\fR" 4
  933. .IX Item "--add-gnu-debuglink=path-to-file"
  934. Creates a .gnu_debuglink section which contains a reference to
  935. \&\fIpath-to-file\fR and adds it to the output file. Note: the file at
  936. \&\fIpath-to-file\fR must exist. Part of the process of adding the
  937. \&.gnu_debuglink section involves embedding a checksum of the contents
  938. of the debug info file into the section.
  939. .Sp
  940. If the debug info file is built in one location but it is going to be
  941. installed at a later time into a different location then do not use
  942. the path to the installed location. The \fB\-\-add\-gnu\-debuglink\fR
  943. option will fail because the installed file does not exist yet.
  944. Instead put the debug info file in the current directory and use the
  945. \&\fB\-\-add\-gnu\-debuglink\fR option without any directory components,
  946. like this:
  947. .Sp
  948. .Vb 1
  949. \& objcopy \-\-add\-gnu\-debuglink=foo.debug
  950. .Ve
  951. .Sp
  952. At debug time the debugger will attempt to look for the separate debug
  953. info file in a set of known locations. The exact set of these
  954. locations varies depending upon the distribution being used, but it
  955. typically includes:
  956. .RS 4
  957. .ie n .IP """* The same directory as the executable.""" 4
  958. .el .IP "\f(CW* The same directory as the executable.\fR" 4
  959. .IX Item "* The same directory as the executable."
  960. .PD 0
  961. .ie n .IP """* A sub\-directory of the directory containing the executable""" 4
  962. .el .IP "\f(CW* A sub\-directory of the directory containing the executable\fR" 4
  963. .IX Item "* A sub-directory of the directory containing the executable"
  964. .PD
  965. called .debug
  966. .ie n .IP """* A global debug directory such as /usr/lib/debug.""" 4
  967. .el .IP "\f(CW* A global debug directory such as /usr/lib/debug.\fR" 4
  968. .IX Item "* A global debug directory such as /usr/lib/debug."
  969. .RE
  970. .RS 4
  971. .Sp
  972. As long as the debug info file has been installed into one of these
  973. locations before the debugger is run everything should work
  974. correctly.
  975. .RE
  976. .IP "\fB\-\-keep\-file\-symbols\fR" 4
  977. .IX Item "--keep-file-symbols"
  978. When stripping a file, perhaps with \fB\-\-strip\-debug\fR or
  979. \&\fB\-\-strip\-unneeded\fR, retain any symbols specifying source file names,
  980. which would otherwise get stripped.
  981. .IP "\fB\-\-only\-keep\-debug\fR" 4
  982. .IX Item "--only-keep-debug"
  983. Strip a file, removing contents of any sections that would not be
  984. stripped by \fB\-\-strip\-debug\fR and leaving the debugging sections
  985. intact. In \s-1ELF\s0 files, this preserves all note sections in the output.
  986. .Sp
  987. Note \- the section headers of the stripped sections are preserved,
  988. including their sizes, but the contents of the section are discarded.
  989. The section headers are preserved so that other tools can match up the
  990. debuginfo file with the real executable, even if that executable has
  991. been relocated to a different address space.
  992. .Sp
  993. The intention is that this option will be used in conjunction with
  994. \&\fB\-\-add\-gnu\-debuglink\fR to create a two part executable. One a
  995. stripped binary which will occupy less space in \s-1RAM\s0 and in a
  996. distribution and the second a debugging information file which is only
  997. needed if debugging abilities are required. The suggested procedure
  998. to create these files is as follows:
  999. .RS 4
  1000. .IP "1.<Link the executable as normal. Assuming that it is called>" 4
  1001. .IX Item "1.<Link the executable as normal. Assuming that it is called>"
  1002. \&\f(CW\*(C`foo\*(C'\fR then...
  1003. .ie n .IP "1.<Run ""objcopy \-\-only\-keep\-debug foo foo.dbg"" to>" 4
  1004. .el .IP "1.<Run \f(CWobjcopy \-\-only\-keep\-debug foo foo.dbg\fR to>" 4
  1005. .IX Item "1.<Run objcopy --only-keep-debug foo foo.dbg to>"
  1006. create a file containing the debugging info.
  1007. .ie n .IP "1.<Run ""objcopy \-\-strip\-debug foo"" to create a>" 4
  1008. .el .IP "1.<Run \f(CWobjcopy \-\-strip\-debug foo\fR to create a>" 4
  1009. .IX Item "1.<Run objcopy --strip-debug foo to create a>"
  1010. stripped executable.
  1011. .ie n .IP "1.<Run ""objcopy \-\-add\-gnu\-debuglink=foo.dbg foo"">" 4
  1012. .el .IP "1.<Run \f(CWobjcopy \-\-add\-gnu\-debuglink=foo.dbg foo\fR>" 4
  1013. .IX Item "1.<Run objcopy --add-gnu-debuglink=foo.dbg foo>"
  1014. to add a link to the debugging info into the stripped executable.
  1015. .RE
  1016. .RS 4
  1017. .Sp
  1018. Note\-\-\-the choice of \f(CW\*(C`.dbg\*(C'\fR as an extension for the debug info
  1019. file is arbitrary. Also the \f(CW\*(C`\-\-only\-keep\-debug\*(C'\fR step is
  1020. optional. You could instead do this:
  1021. .IP "1.<Link the executable as normal.>" 4
  1022. .IX Item "1.<Link the executable as normal.>"
  1023. .PD 0
  1024. .ie n .IP "1.<Copy ""foo"" to ""foo.full"">" 4
  1025. .el .IP "1.<Copy \f(CWfoo\fR to \f(CWfoo.full\fR>" 4
  1026. .IX Item "1.<Copy foo to foo.full>"
  1027. .ie n .IP "1.<Run ""objcopy \-\-strip\-debug foo"">" 4
  1028. .el .IP "1.<Run \f(CWobjcopy \-\-strip\-debug foo\fR>" 4
  1029. .IX Item "1.<Run objcopy --strip-debug foo>"
  1030. .ie n .IP "1.<Run ""objcopy \-\-add\-gnu\-debuglink=foo.full foo"">" 4
  1031. .el .IP "1.<Run \f(CWobjcopy \-\-add\-gnu\-debuglink=foo.full foo\fR>" 4
  1032. .IX Item "1.<Run objcopy --add-gnu-debuglink=foo.full foo>"
  1033. .RE
  1034. .RS 4
  1035. .PD
  1036. .Sp
  1037. i.e., the file pointed to by the \fB\-\-add\-gnu\-debuglink\fR can be the
  1038. full executable. It does not have to be a file created by the
  1039. \&\fB\-\-only\-keep\-debug\fR switch.
  1040. .Sp
  1041. Note\-\-\-this switch is only intended for use on fully linked files. It
  1042. does not make sense to use it on object files where the debugging
  1043. information may be incomplete. Besides the gnu_debuglink feature
  1044. currently only supports the presence of one filename containing
  1045. debugging information, not multiple filenames on a one-per-object-file
  1046. basis.
  1047. .RE
  1048. .IP "\fB\-\-strip\-dwo\fR" 4
  1049. .IX Item "--strip-dwo"
  1050. Remove the contents of all \s-1DWARF\s0 .dwo sections, leaving the
  1051. remaining debugging sections and all symbols intact.
  1052. This option is intended for use by the compiler as part of
  1053. the \fB\-gsplit\-dwarf\fR option, which splits debug information
  1054. between the .o file and a separate .dwo file. The compiler
  1055. generates all debug information in the same file, then uses
  1056. the \fB\-\-extract\-dwo\fR option to copy the .dwo sections to
  1057. the .dwo file, then the \fB\-\-strip\-dwo\fR option to remove
  1058. those sections from the original .o file.
  1059. .IP "\fB\-\-extract\-dwo\fR" 4
  1060. .IX Item "--extract-dwo"
  1061. Extract the contents of all \s-1DWARF\s0 .dwo sections. See the
  1062. \&\fB\-\-strip\-dwo\fR option for more information.
  1063. .IP "\fB\-\-file\-alignment\fR \fInum\fR" 4
  1064. .IX Item "--file-alignment num"
  1065. Specify the file alignment. Sections in the file will always begin at
  1066. file offsets which are multiples of this number. This defaults to
  1067. 512.
  1068. [This option is specific to \s-1PE\s0 targets.]
  1069. .IP "\fB\-\-heap\fR \fIreserve\fR" 4
  1070. .IX Item "--heap reserve"
  1071. .PD 0
  1072. .IP "\fB\-\-heap\fR \fIreserve\fR\fB,\fR\fIcommit\fR" 4
  1073. .IX Item "--heap reserve,commit"
  1074. .PD
  1075. Specify the number of bytes of memory to reserve (and optionally commit)
  1076. to be used as heap for this program.
  1077. [This option is specific to \s-1PE\s0 targets.]
  1078. .IP "\fB\-\-image\-base\fR \fIvalue\fR" 4
  1079. .IX Item "--image-base value"
  1080. Use \fIvalue\fR as the base address of your program or dll. This is
  1081. the lowest memory location that will be used when your program or dll
  1082. is loaded. To reduce the need to relocate and improve performance of
  1083. your dlls, each should have a unique base address and not overlap any
  1084. other dlls. The default is 0x400000 for executables, and 0x10000000
  1085. for dlls.
  1086. [This option is specific to \s-1PE\s0 targets.]
  1087. .IP "\fB\-\-section\-alignment\fR \fInum\fR" 4
  1088. .IX Item "--section-alignment num"
  1089. Sets the section alignment field in the \s-1PE\s0 header. Sections in memory
  1090. will always begin at addresses which are a multiple of this number.
  1091. Defaults to 0x1000.
  1092. [This option is specific to \s-1PE\s0 targets.]
  1093. .IP "\fB\-\-stack\fR \fIreserve\fR" 4
  1094. .IX Item "--stack reserve"
  1095. .PD 0
  1096. .IP "\fB\-\-stack\fR \fIreserve\fR\fB,\fR\fIcommit\fR" 4
  1097. .IX Item "--stack reserve,commit"
  1098. .PD
  1099. Specify the number of bytes of memory to reserve (and optionally commit)
  1100. to be used as stack for this program.
  1101. [This option is specific to \s-1PE\s0 targets.]
  1102. .IP "\fB\-\-subsystem\fR \fIwhich\fR" 4
  1103. .IX Item "--subsystem which"
  1104. .PD 0
  1105. .IP "\fB\-\-subsystem\fR \fIwhich\fR\fB:\fR\fImajor\fR" 4
  1106. .IX Item "--subsystem which:major"
  1107. .IP "\fB\-\-subsystem\fR \fIwhich\fR\fB:\fR\fImajor\fR\fB.\fR\fIminor\fR" 4
  1108. .IX Item "--subsystem which:major.minor"
  1109. .PD
  1110. Specifies the subsystem under which your program will execute. The
  1111. legal values for \fIwhich\fR are \f(CW\*(C`native\*(C'\fR, \f(CW\*(C`windows\*(C'\fR,
  1112. \&\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,
  1113. \&\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
  1114. the subsystem version also. Numeric values are also accepted for
  1115. \&\fIwhich\fR.
  1116. [This option is specific to \s-1PE\s0 targets.]
  1117. .IP "\fB\-\-extract\-symbol\fR" 4
  1118. .IX Item "--extract-symbol"
  1119. Keep the file's section flags and symbols but remove all section data.
  1120. Specifically, the option:
  1121. .RS 4
  1122. .IP "*<removes the contents of all sections;>" 4
  1123. .IX Item "*<removes the contents of all sections;>"
  1124. .PD 0
  1125. .IP "*<sets the size of every section to zero; and>" 4
  1126. .IX Item "*<sets the size of every section to zero; and>"
  1127. .IP "*<sets the file's start address to zero.>" 4
  1128. .IX Item "*<sets the file's start address to zero.>"
  1129. .RE
  1130. .RS 4
  1131. .PD
  1132. .Sp
  1133. This option is used to build a \fI.sym\fR file for a VxWorks kernel.
  1134. It can also be a useful way of reducing the size of a \fB\-\-just\-symbols\fR
  1135. linker input file.
  1136. .RE
  1137. .IP "\fB\-\-compress\-debug\-sections\fR" 4
  1138. .IX Item "--compress-debug-sections"
  1139. Compress \s-1DWARF\s0 debug sections using zlib with \s-1SHF_COMPRESSED\s0 from the
  1140. \&\s-1ELF ABI.\s0 Note \- if compression would actually make a section
  1141. \&\fIlarger\fR, then it is not compressed.
  1142. .IP "\fB\-\-compress\-debug\-sections=none\fR" 4
  1143. .IX Item "--compress-debug-sections=none"
  1144. .PD 0
  1145. .IP "\fB\-\-compress\-debug\-sections=zlib\fR" 4
  1146. .IX Item "--compress-debug-sections=zlib"
  1147. .IP "\fB\-\-compress\-debug\-sections=zlib\-gnu\fR" 4
  1148. .IX Item "--compress-debug-sections=zlib-gnu"
  1149. .IP "\fB\-\-compress\-debug\-sections=zlib\-gabi\fR" 4
  1150. .IX Item "--compress-debug-sections=zlib-gabi"
  1151. .PD
  1152. For \s-1ELF\s0 files, these options control how \s-1DWARF\s0 debug sections are
  1153. compressed. \fB\-\-compress\-debug\-sections=none\fR is equivalent
  1154. to \fB\-\-decompress\-debug\-sections\fR.
  1155. \&\fB\-\-compress\-debug\-sections=zlib\fR and
  1156. \&\fB\-\-compress\-debug\-sections=zlib\-gabi\fR are equivalent to
  1157. \&\fB\-\-compress\-debug\-sections\fR.
  1158. \&\fB\-\-compress\-debug\-sections=zlib\-gnu\fR compresses \s-1DWARF\s0 debug
  1159. sections using zlib. The debug sections are renamed to begin with
  1160. \&\fB.zdebug\fR instead of \fB.debug\fR. Note \- if compression would
  1161. actually make a section \fIlarger\fR, then it is not compressed nor
  1162. renamed.
  1163. .IP "\fB\-\-decompress\-debug\-sections\fR" 4
  1164. .IX Item "--decompress-debug-sections"
  1165. Decompress \s-1DWARF\s0 debug sections using zlib. The original section
  1166. names of the compressed sections are restored.
  1167. .IP "\fB\-\-elf\-stt\-common=yes\fR" 4
  1168. .IX Item "--elf-stt-common=yes"
  1169. .PD 0
  1170. .IP "\fB\-\-elf\-stt\-common=no\fR" 4
  1171. .IX Item "--elf-stt-common=no"
  1172. .PD
  1173. For \s-1ELF\s0 files, these options control whether common symbols should be
  1174. converted to the \f(CW\*(C`STT_COMMON\*(C'\fR or \f(CW\*(C`STT_OBJECT\*(C'\fR type.
  1175. \&\fB\-\-elf\-stt\-common=yes\fR converts common symbol type to
  1176. \&\f(CW\*(C`STT_COMMON\*(C'\fR. \fB\-\-elf\-stt\-common=no\fR converts common symbol
  1177. type to \f(CW\*(C`STT_OBJECT\*(C'\fR.
  1178. .IP "\fB\-\-merge\-notes\fR" 4
  1179. .IX Item "--merge-notes"
  1180. .PD 0
  1181. .IP "\fB\-\-no\-merge\-notes\fR" 4
  1182. .IX Item "--no-merge-notes"
  1183. .PD
  1184. For \s-1ELF\s0 files, attempt (or do not attempt) to reduce the size of any
  1185. \&\s-1SHT_NOTE\s0 type sections by removing duplicate notes.
  1186. .IP "\fB\-V\fR" 4
  1187. .IX Item "-V"
  1188. .PD 0
  1189. .IP "\fB\-\-version\fR" 4
  1190. .IX Item "--version"
  1191. .PD
  1192. Show the version number of \fBobjcopy\fR.
  1193. .IP "\fB\-\-verilog\-data\-width=\fR\fIbytes\fR" 4
  1194. .IX Item "--verilog-data-width=bytes"
  1195. For Verilog output, this options controls the number of bytes
  1196. converted for each output data element. The input target controls the
  1197. endianness of the conversion.
  1198. .IP "\fB\-v\fR" 4
  1199. .IX Item "-v"
  1200. .PD 0
  1201. .IP "\fB\-\-verbose\fR" 4
  1202. .IX Item "--verbose"
  1203. .PD
  1204. Verbose output: list all object files modified. In the case of
  1205. archives, \fBobjcopy \-V\fR lists all members of the archive.
  1206. .IP "\fB\-\-help\fR" 4
  1207. .IX Item "--help"
  1208. Show a summary of the options to \fBobjcopy\fR.
  1209. .IP "\fB\-\-info\fR" 4
  1210. .IX Item "--info"
  1211. Display a list showing all architectures and object formats available.
  1212. .IP "\fB@\fR\fIfile\fR" 4
  1213. .IX Item "@file"
  1214. Read command-line options from \fIfile\fR. The options read are
  1215. inserted in place of the original @\fIfile\fR option. If \fIfile\fR
  1216. does not exist, or cannot be read, then the option will be treated
  1217. literally, and not removed.
  1218. .Sp
  1219. Options in \fIfile\fR are separated by whitespace. A whitespace
  1220. character may be included in an option by surrounding the entire
  1221. option in either single or double quotes. Any character (including a
  1222. backslash) may be included by prefixing the character to be included
  1223. with a backslash. The \fIfile\fR may itself contain additional
  1224. @\fIfile\fR options; any such options will be processed recursively.
  1225. .SH "SEE ALSO"
  1226. .IX Header "SEE ALSO"
  1227. \&\fIld\fR\|(1), \fIobjdump\fR\|(1), and the Info entries for \fIbinutils\fR.
  1228. .SH "COPYRIGHT"
  1229. .IX Header "COPYRIGHT"
  1230. Copyright (c) 1991\-2021 Free Software Foundation, Inc.
  1231. .PP
  1232. Permission is granted to copy, distribute and/or modify this document
  1233. under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3
  1234. or any later version published by the Free Software Foundation;
  1235. with no Invariant Sections, with no Front-Cover Texts, and with no
  1236. Back-Cover Texts. A copy of the license is included in the
  1237. section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".