You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 3 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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-2020 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 6.5, http://www.gnu.org/software/texinfo/ -->
  12. <head>
  13. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  14. <title>elfedit (GNU Binary Utilities)</title>
  15. <meta name="description" content="elfedit (GNU Binary Utilities)">
  16. <meta name="keywords" content="elfedit (GNU Binary Utilities)">
  17. <meta name="resource-type" content="document">
  18. <meta name="distribution" content="global">
  19. <meta name="Generator" content="makeinfo">
  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.indentedblock {margin-right: 0em}
  30. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  31. blockquote.smallquotation {font-size: smaller}
  32. div.display {margin-left: 3.2em}
  33. div.example {margin-left: 3.2em}
  34. div.lisp {margin-left: 3.2em}
  35. div.smalldisplay {margin-left: 3.2em}
  36. div.smallexample {margin-left: 3.2em}
  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.nolinebreak {white-space: nowrap}
  48. span.roman {font-family: initial; font-weight: normal}
  49. span.sansserif {font-family: sans-serif; font-weight: normal}
  50. ul.no-bullet {list-style: none}
  51. -->
  52. </style>
  53. </head>
  54. <body lang="en">
  55. <a name="elfedit"></a>
  56. <div class="header">
  57. <p>
  58. 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>
  59. </div>
  60. <hr>
  61. <a name="elfedit-1"></a>
  62. <h2 class="chapter">15 elfedit</h2>
  63. <a name="index-Update-ELF-header"></a>
  64. <a name="index-elfedit"></a>
  65. <div class="smallexample">
  66. <pre class="smallexample">elfedit [<samp>--input-mach=</samp><var>machine</var>]
  67. [<samp>--input-type=</samp><var>type</var>]
  68. [<samp>--input-osabi=</samp><var>osabi</var>]
  69. <samp>--output-mach=</samp><var>machine</var>
  70. <samp>--output-type=</samp><var>type</var>
  71. <samp>--output-osabi=</samp><var>osabi</var>
  72. <samp>--enable-x86-feature=</samp><var>feature</var>
  73. <samp>--disable-x86-feature=</samp><var>feature</var>
  74. [<samp>-v</samp>|<samp>--version</samp>]
  75. [<samp>-h</samp>|<samp>--help</samp>]
  76. <var>elffile</var>&hellip;
  77. </pre></div>
  78. <p><code>elfedit</code> updates the ELF header and program property of ELF
  79. files which have the matching ELF machine and file types. The options
  80. control how and which fields in the ELF header and program property
  81. should be updated.
  82. </p>
  83. <p><var>elffile</var>&hellip; are the ELF files to be updated. 32-bit and
  84. 64-bit ELF files are supported, as are archives containing ELF files.
  85. </p>
  86. <p>The long and short forms of options, shown here as alternatives, are
  87. equivalent. At least one of the <samp>--output-mach</samp>,
  88. <samp>--output-type</samp>, <samp>--output-osabi</samp>,
  89. <samp>--enable-x86-feature</samp> and <samp>--disable-x86-feature</samp>
  90. options must be given.
  91. </p>
  92. <dl compact="compact">
  93. <dt><code>--input-mach=<var>machine</var></code></dt>
  94. <dd><p>Set the matching input ELF machine type to <var>machine</var>. If
  95. <samp>--input-mach</samp> isn&rsquo;t specified, it will match any ELF
  96. machine types.
  97. </p>
  98. <p>The supported ELF machine types are, <var>i386</var>, <var>IAMCU</var>, <var>L1OM</var>,
  99. <var>K1OM</var> and <var>x86-64</var>.
  100. </p>
  101. </dd>
  102. <dt><code>--output-mach=<var>machine</var></code></dt>
  103. <dd><p>Change the ELF machine type in the ELF header to <var>machine</var>. The
  104. supported ELF machine types are the same as <samp>--input-mach</samp>.
  105. </p>
  106. </dd>
  107. <dt><code>--input-type=<var>type</var></code></dt>
  108. <dd><p>Set the matching input ELF file type to <var>type</var>. If
  109. <samp>--input-type</samp> isn&rsquo;t specified, it will match any ELF file types.
  110. </p>
  111. <p>The supported ELF file types are, <var>rel</var>, <var>exec</var> and <var>dyn</var>.
  112. </p>
  113. </dd>
  114. <dt><code>--output-type=<var>type</var></code></dt>
  115. <dd><p>Change the ELF file type in the ELF header to <var>type</var>. The
  116. supported ELF types are the same as <samp>--input-type</samp>.
  117. </p>
  118. </dd>
  119. <dt><code>--input-osabi=<var>osabi</var></code></dt>
  120. <dd><p>Set the matching input ELF file OSABI to <var>osabi</var>. If
  121. <samp>--input-osabi</samp> isn&rsquo;t specified, it will match any ELF OSABIs.
  122. </p>
  123. <p>The supported ELF OSABIs are, <var>none</var>, <var>HPUX</var>, <var>NetBSD</var>,
  124. <var>GNU</var>, <var>Linux</var> (alias for <var>GNU</var>),
  125. <var>Solaris</var>, <var>AIX</var>, <var>Irix</var>,
  126. <var>FreeBSD</var>, <var>TRU64</var>, <var>Modesto</var>, <var>OpenBSD</var>, <var>OpenVMS</var>,
  127. <var>NSK</var>, <var>AROS</var> and <var>FenixOS</var>.
  128. </p>
  129. </dd>
  130. <dt><code>--output-osabi=<var>osabi</var></code></dt>
  131. <dd><p>Change the ELF OSABI in the ELF header to <var>osabi</var>. The
  132. supported ELF OSABI are the same as <samp>--input-osabi</samp>.
  133. </p>
  134. </dd>
  135. <dt><code>--enable-x86-feature=<var>feature</var></code></dt>
  136. <dd><p>Set the <var>feature</var> bit in program property in <var>exec</var> or <var>dyn</var>
  137. ELF files with machine types of <var>i386</var> or <var>x86-64</var>. The
  138. supported features are, <var>ibt</var> and <var>shstk</var>.
  139. </p>
  140. </dd>
  141. <dt><code>--disable-x86-feature=<var>feature</var></code></dt>
  142. <dd><p>Clear the <var>feature</var> bit in program property in <var>exec</var> or
  143. <var>dyn</var> ELF files with machine types of <var>i386</var> or <var>x86-64</var>.
  144. The supported features are the same as <samp>--enable-x86-feature</samp>.
  145. </p>
  146. <p>Note: <samp>--enable-x86-feature</samp> and <samp>--disable-x86-feature</samp>
  147. are available only on hosts with &lsquo;<samp>mmap</samp>&rsquo; support.
  148. </p>
  149. </dd>
  150. <dt><code>-v</code></dt>
  151. <dt><code>--version</code></dt>
  152. <dd><p>Display the version number of <code>elfedit</code>.
  153. </p>
  154. </dd>
  155. <dt><code>-h</code></dt>
  156. <dt><code>--help</code></dt>
  157. <dd><p>Display the command-line options understood by <code>elfedit</code>.
  158. </p>
  159. </dd>
  160. </dl>
  161. <hr>
  162. <div class="header">
  163. <p>
  164. 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>
  165. </div>
  166. </body>
  167. </html>