elfedit.html 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1991-2017 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3
  6. or any later version published by the Free Software Foundation;
  7. with no Invariant Sections, with no Front-Cover Texts, and with no
  8. Back-Cover Texts. A copy of the license is included in the
  9. section entitled "GNU Free Documentation License".
  10. -->
  11. <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
  12. <head>
  13. <title>GNU Binary Utilities: elfedit</title>
  14. <meta name="description" content="GNU Binary Utilities: elfedit">
  15. <meta name="keywords" content="GNU Binary Utilities: elfedit">
  16. <meta name="resource-type" content="document">
  17. <meta name="distribution" content="global">
  18. <meta name="Generator" content="makeinfo">
  19. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  20. <link href="index.html#Top" rel="start" title="Top">
  21. <link href="Binutils-Index.html#Binutils-Index" rel="index" title="Binutils Index">
  22. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  23. <link href="index.html#Top" rel="up" title="Top">
  24. <link href="Common-Options.html#Common-Options" rel="next" title="Common Options">
  25. <link href="readelf.html#readelf" rel="prev" title="readelf">
  26. <style type="text/css">
  27. <!--
  28. a.summary-letter {text-decoration: none}
  29. blockquote.smallquotation {font-size: smaller}
  30. div.display {margin-left: 3.2em}
  31. div.example {margin-left: 3.2em}
  32. div.indentedblock {margin-left: 3.2em}
  33. div.lisp {margin-left: 3.2em}
  34. div.smalldisplay {margin-left: 3.2em}
  35. div.smallexample {margin-left: 3.2em}
  36. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  37. div.smalllisp {margin-left: 3.2em}
  38. kbd {font-style:oblique}
  39. pre.display {font-family: inherit}
  40. pre.format {font-family: inherit}
  41. pre.menu-comment {font-family: serif}
  42. pre.menu-preformatted {font-family: serif}
  43. pre.smalldisplay {font-family: inherit; font-size: smaller}
  44. pre.smallexample {font-size: smaller}
  45. pre.smallformat {font-family: inherit; font-size: smaller}
  46. pre.smalllisp {font-size: smaller}
  47. span.nocodebreak {white-space:nowrap}
  48. span.nolinebreak {white-space:nowrap}
  49. span.roman {font-family:serif; font-weight:normal}
  50. span.sansserif {font-family:sans-serif; font-weight:normal}
  51. ul.no-bullet {list-style: none}
  52. -->
  53. </style>
  54. </head>
  55. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  56. <a name="elfedit"></a>
  57. <div class="header">
  58. <p>
  59. Next: <a href="Common-Options.html#Common-Options" accesskey="n" rel="next">Common Options</a>, Previous: <a href="readelf.html#readelf" accesskey="p" rel="prev">readelf</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Binutils-Index.html#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  60. </div>
  61. <hr>
  62. <a name="elfedit-1"></a>
  63. <h2 class="chapter">16 elfedit</h2>
  64. <a name="index-Update-ELF-header"></a>
  65. <a name="index-elfedit"></a>
  66. <div class="smallexample">
  67. <pre class="smallexample">elfedit [<samp>--input-mach=</samp><var>machine</var>]
  68. [<samp>--input-type=</samp><var>type</var>]
  69. [<samp>--input-osabi=</samp><var>osabi</var>]
  70. <samp>--output-mach=</samp><var>machine</var>
  71. <samp>--output-type=</samp><var>type</var>
  72. <samp>--output-osabi=</samp><var>osabi</var>
  73. [<samp>-v</samp>|<samp>--version</samp>]
  74. [<samp>-h</samp>|<samp>--help</samp>]
  75. <var>elffile</var>&hellip;
  76. </pre></div>
  77. <p><code>elfedit</code> updates the ELF header of ELF files which have
  78. the matching ELF machine and file types. The options control how and
  79. which fields in the ELF header should be updated.
  80. </p>
  81. <p><var>elffile</var>&hellip; are the ELF files to be updated. 32-bit and
  82. 64-bit ELF files are supported, as are archives containing ELF files.
  83. </p>
  84. <p>The long and short forms of options, shown here as alternatives, are
  85. equivalent. At least one of the <samp>--output-mach</samp>,
  86. <samp>--output-type</samp> and <samp>--output-osabi</samp> options must be given.
  87. </p>
  88. <dl compact="compact">
  89. <dt><code>--input-mach=<var>machine</var></code></dt>
  90. <dd><p>Set the matching input ELF machine type to <var>machine</var>. If
  91. <samp>--input-mach</samp> isn&rsquo;t specified, it will match any ELF
  92. machine types.
  93. </p>
  94. <p>The supported ELF machine types are, <var>i386</var>, <var>IAMCU</var>, <var>L1OM</var>,
  95. <var>K1OM</var> and <var>x86-64</var>.
  96. </p>
  97. </dd>
  98. <dt><code>--output-mach=<var>machine</var></code></dt>
  99. <dd><p>Change the ELF machine type in the ELF header to <var>machine</var>. The
  100. supported ELF machine types are the same as <samp>--input-mach</samp>.
  101. </p>
  102. </dd>
  103. <dt><code>--input-type=<var>type</var></code></dt>
  104. <dd><p>Set the matching input ELF file type to <var>type</var>. If
  105. <samp>--input-type</samp> isn&rsquo;t specified, it will match any ELF file types.
  106. </p>
  107. <p>The supported ELF file types are, <var>rel</var>, <var>exec</var> and <var>dyn</var>.
  108. </p>
  109. </dd>
  110. <dt><code>--output-type=<var>type</var></code></dt>
  111. <dd><p>Change the ELF file type in the ELF header to <var>type</var>. The
  112. supported ELF types are the same as <samp>--input-type</samp>.
  113. </p>
  114. </dd>
  115. <dt><code>--input-osabi=<var>osabi</var></code></dt>
  116. <dd><p>Set the matching input ELF file OSABI to <var>osabi</var>. If
  117. <samp>--input-osabi</samp> isn&rsquo;t specified, it will match any ELF OSABIs.
  118. </p>
  119. <p>The supported ELF OSABIs are, <var>none</var>, <var>HPUX</var>, <var>NetBSD</var>,
  120. <var>GNU</var>, <var>Linux</var> (alias for <var>GNU</var>),
  121. <var>Solaris</var>, <var>AIX</var>, <var>Irix</var>,
  122. <var>FreeBSD</var>, <var>TRU64</var>, <var>Modesto</var>, <var>OpenBSD</var>, <var>OpenVMS</var>,
  123. <var>NSK</var>, <var>AROS</var> and <var>FenixOS</var>.
  124. </p>
  125. </dd>
  126. <dt><code>--output-osabi=<var>osabi</var></code></dt>
  127. <dd><p>Change the ELF OSABI in the ELF header to <var>osabi</var>. The
  128. supported ELF OSABI are the same as <samp>--input-osabi</samp>.
  129. </p>
  130. </dd>
  131. <dt><code>-v</code></dt>
  132. <dt><code>--version</code></dt>
  133. <dd><p>Display the version number of <code>elfedit</code>.
  134. </p>
  135. </dd>
  136. <dt><code>-h</code></dt>
  137. <dt><code>--help</code></dt>
  138. <dd><p>Display the command line options understood by <code>elfedit</code>.
  139. </p>
  140. </dd>
  141. </dl>
  142. <hr>
  143. <div class="header">
  144. <p>
  145. Next: <a href="Common-Options.html#Common-Options" accesskey="n" rel="next">Common Options</a>, Previous: <a href="readelf.html#readelf" accesskey="p" rel="prev">readelf</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Binutils-Index.html#Binutils-Index" title="Index" rel="index">Index</a>]</p>
  146. </div>
  147. </body>
  148. </html>