Debian Codegraph @

upstream/debian-unstable/man1/elfedit.1

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "ELFEDIT 1"
58 .TH ELFEDIT 1 2026-03-05 binutils-2.46 "GNU Development Tools"
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 elfedit \- update ELF header and program property of ELF files
65 .SH SYNOPSIS
66 .IX Header "SYNOPSIS"
67 elfedit [\fB\-\-input\-mach=\fR\fImachine\fR]
68 [\fB\-\-input\-type=\fR\fItype\fR]
69 [\fB\-\-input\-osabi=\fR\fIosabi\fR]
70 [\fB\-\-input\-abiversion=\fR\fIversion\fR]
71 \fB\-\-output\-mach=\fR\fImachine\fR
72 \fB\-\-output\-type=\fR\fItype\fR
73 \fB\-\-output\-osabi=\fR\fIosabi\fR
74 \fB\-\-output\-abiversion=\fR\fIversion\fR
75 \fB\-\-enable\-x86\-feature=\fR\fIfeature\fR
76 \fB\-\-disable\-x86\-feature=\fR\fIfeature\fR
77 [\fB\-v\fR|\fB\-\-version\fR]
78 [\fB\-h\fR|\fB\-\-help\fR]
79 \fIelffile\fR...
80 .SH DESCRIPTION
81 .IX Header "DESCRIPTION"
82 \&\fBelfedit\fR updates the ELF header and program property of ELF
83 files which have the matching ELF machine and file types. The options
84 control how and which fields in the ELF header and program property
85 should be updated.
86 .PP
87 \&\fIelffile\fR... are the ELF files to be updated. 32\-bit and
88 64\-bit ELF files are supported, as are archives containing ELF files.
89 .SH OPTIONS
90 .IX Header "OPTIONS"
91 The long and short forms of options, shown here as alternatives, are
92 equivalent. At least one of the \fB\-\-output\-mach\fR,
93 \&\fB\-\-output\-type\fR, \fB\-\-output\-osabi\fR,
94 \&\fB\-\-output\-abiversion\fR,
95 \&\fB\-\-enable\-x86\-feature\fR and \fB\-\-disable\-x86\-feature\fR
96 options must be given.
97 .IP \fB\-\-input\-mach=\fR\fImachine\fR 4
98 .IX Item "--input-mach=machine"
99 Set the matching input ELF machine type to \fImachine\fR. If
100 \&\fB\-\-input\-mach\fR isn't specified, it will match any ELF
101 machine types.
102 .Sp
103 The supported ELF machine types are, \fIi386\fR, \fIIAMCU\fR, \fIL1OM\fR,
104 \&\fIK1OM\fR and \fIx86\-64\fR.
105 .IP \fB\-\-output\-mach=\fR\fImachine\fR 4
106 .IX Item "--output-mach=machine"
107 Change the ELF machine type in the ELF header to \fImachine\fR. The
108 supported ELF machine types are the same as \fB\-\-input\-mach\fR.
109 .IP \fB\-\-input\-type=\fR\fItype\fR 4
110 .IX Item "--input-type=type"
111 Set the matching input ELF file type to \fItype\fR. If
112 \&\fB\-\-input\-type\fR isn't specified, it will match any ELF file types.
113 .Sp
114 The supported ELF file types are, \fIrel\fR, \fIexec\fR and \fIdyn\fR.
115 .IP \fB\-\-output\-type=\fR\fItype\fR 4
116 .IX Item "--output-type=type"
117 Change the ELF file type in the ELF header to \fItype\fR. The
118 supported ELF types are the same as \fB\-\-input\-type\fR.
119 .IP \fB\-\-input\-osabi=\fR\fIosabi\fR 4
120 .IX Item "--input-osabi=osabi"
121 Set the matching input ELF file OSABI to \fIosabi\fR. If
122 \&\fB\-\-input\-osabi\fR isn't specified, it will match any ELF OSABIs.
123 .Sp
124 The supported ELF OSABIs are, \fInone\fR, \fIHPUX\fR, \fINetBSD\fR,
125 \&\fIGNU\fR, \fILinux\fR (alias for \fIGNU\fR),
126 \&\fISolaris\fR, \fIAIX\fR, \fIIrix\fR,
127 \&\fIFreeBSD\fR, \fITRU64\fR, \fIModesto\fR, \fIOpenBSD\fR, \fIOpenVMS\fR,
128 \&\fINSK\fR, \fIAROS\fR and \fIFenixOS\fR.
129 .IP \fB\-\-output\-osabi=\fR\fIosabi\fR 4
130 .IX Item "--output-osabi=osabi"
131 Change the ELF OSABI in the ELF header to \fIosabi\fR. The
132 supported ELF OSABI are the same as \fB\-\-input\-osabi\fR.
133 .IP \fB\-\-input\-abiversion=\fR\fIversion\fR 4
134 .IX Item "--input-abiversion=version"
135 Set the matching input ELF file ABIVERSION to \fIversion\fR.
136 \&\fIversion\fR must be between 0 and 255. If \fB\-\-input\-abiversion\fR
137 isn't specified, it will match any ELF ABIVERSIONs.
138 .IP \fB\-\-output\-abiversion=\fR\fIversion\fR 4
139 .IX Item "--output-abiversion=version"
140 Change the ELF ABIVERSION in the ELF header to \fIversion\fR.
141 \&\fIversion\fR must be between 0 and 255.
142 .IP \fB\-\-enable\-x86\-feature=\fR\fIfeature\fR 4
143 .IX Item "--enable-x86-feature=feature"
144 Set the \fIfeature\fR bit in program property in \fIexec\fR or \fIdyn\fR
145 ELF files with machine types of \fIi386\fR or \fIx86\-64\fR. The
146 supported features are, \fIibt\fR, \fIshstk\fR, \fIlam_u48\fR and
147 \&\fIlam_u57\fR.
148 .IP \fB\-\-disable\-x86\-feature=\fR\fIfeature\fR 4
149 .IX Item "--disable-x86-feature=feature"
150 Clear the \fIfeature\fR bit in program property in \fIexec\fR or
151 \&\fIdyn\fR ELF files with machine types of \fIi386\fR or \fIx86\-64\fR.
152 The supported features are the same as \fB\-\-enable\-x86\-feature\fR.
153 .Sp
154 Note: \fB\-\-enable\-x86\-feature\fR and \fB\-\-disable\-x86\-feature\fR
155 are available only on hosts with \fBmmap\fR support.
156 .IP \fB\-v\fR 4
157 .IX Item "-v"
158 .PD 0
159 .IP \fB\-\-version\fR 4
160 .IX Item "--version"
161 .PD
162 Display the version number of \fBelfedit\fR.
163 .IP \fB\-h\fR 4
164 .IX Item "-h"
165 .PD 0
166 .IP \fB\-\-help\fR 4
167 .IX Item "--help"
168 .PD
169 Display the command-line options understood by \fBelfedit\fR.
170 .IP \fB@\fR\fIfile\fR 4
171 .IX Item "@file"
172 Read command-line options from \fIfile\fR. The options read are
173 inserted in place of the original @\fIfile\fR option. If \fIfile\fR
174 does not exist, or cannot be read, then the option will be treated
175 literally, and not removed.
176 .Sp
177 Options in \fIfile\fR are separated by whitespace. A whitespace
178 character may be included in an option by surrounding the entire
179 option in either single or double quotes. Any character (including a
180 backslash) may be included by prefixing the character to be included
181 with a backslash. The \fIfile\fR may itself contain additional
182 @\fIfile\fR options; any such options will be processed recursively.
183 .SH "SEE ALSO"
184 .IX Header "SEE ALSO"
185 \&\fBreadelf\fR\|(1), and the Info entries for \fIbinutils\fR.
186 .SH COPYRIGHT
187 .IX Header "COPYRIGHT"
188 Copyright (c) 1991\-2026 Free Software Foundation, Inc.
189 .PP
190 Permission is granted to copy, distribute and/or modify this document
191 under the terms of the GNU Free Documentation License, Version 1.3
192 or any later version published by the Free Software Foundation;
193 with no Invariant Sections, with no Front-Cover Texts, and with no
194 Back-Cover Texts. A copy of the license is included in the
195 section entitled "GNU Free Documentation License".