Debian Codegraph @

upstream/opensuse-tumbleweed/man1/elfedit.1

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (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 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "ELFEDIT 1"
61 .TH ELFEDIT 1 2026-03-10 binutils-2.45.0 "GNU Development Tools"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 elfedit \- update ELF header and program property of ELF files
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 elfedit [\fB\-\-input\-mach=\fR\fImachine\fR]
71 [\fB\-\-input\-type=\fR\fItype\fR]
72 [\fB\-\-input\-osabi=\fR\fIosabi\fR]
73 [\fB\-\-input\-abiversion=\fR\fIversion\fR]
74 \fB\-\-output\-mach=\fR\fImachine\fR
75 \fB\-\-output\-type=\fR\fItype\fR
76 \fB\-\-output\-osabi=\fR\fIosabi\fR
77 \fB\-\-output\-abiversion=\fR\fIversion\fR
78 \fB\-\-enable\-x86\-feature=\fR\fIfeature\fR
79 \fB\-\-disable\-x86\-feature=\fR\fIfeature\fR
80 [\fB\-v\fR|\fB\-\-version\fR]
81 [\fB\-h\fR|\fB\-\-help\fR]
82 \fIelffile\fR...
83 .SH DESCRIPTION
84 .IX Header "DESCRIPTION"
85 \&\fBelfedit\fR updates the ELF header and program property of ELF
86 files which have the matching ELF machine and file types. The options
87 control how and which fields in the ELF header and program property
88 should be updated.
89 .PP
90 \&\fIelffile\fR... are the ELF files to be updated. 32\-bit and
91 64\-bit ELF files are supported, as are archives containing ELF files.
92 .SH OPTIONS
93 .IX Header "OPTIONS"
94 The long and short forms of options, shown here as alternatives, are
95 equivalent. At least one of the \fB\-\-output\-mach\fR,
96 \&\fB\-\-output\-type\fR, \fB\-\-output\-osabi\fR,
97 \&\fB\-\-output\-abiversion\fR,
98 \&\fB\-\-enable\-x86\-feature\fR and \fB\-\-disable\-x86\-feature\fR
99 options must be given.
100 .IP \fB\-\-input\-mach=\fR\fImachine\fR 4
101 .IX Item "--input-mach=machine"
102 Set the matching input ELF machine type to \fImachine\fR. If
103 \&\fB\-\-input\-mach\fR isn\*(Aqt specified, it will match any ELF
104 machine types.
105 .Sp
106 The supported ELF machine types are, \fIi386\fR, \fIIAMCU\fR, \fIL1OM\fR,
107 \&\fIK1OM\fR and \fIx86\-64\fR.
108 .IP \fB\-\-output\-mach=\fR\fImachine\fR 4
109 .IX Item "--output-mach=machine"
110 Change the ELF machine type in the ELF header to \fImachine\fR. The
111 supported ELF machine types are the same as \fB\-\-input\-mach\fR.
112 .IP \fB\-\-input\-type=\fR\fItype\fR 4
113 .IX Item "--input-type=type"
114 Set the matching input ELF file type to \fItype\fR. If
115 \&\fB\-\-input\-type\fR isn\*(Aqt specified, it will match any ELF file types.
116 .Sp
117 The supported ELF file types are, \fIrel\fR, \fIexec\fR and \fIdyn\fR.
118 .IP \fB\-\-output\-type=\fR\fItype\fR 4
119 .IX Item "--output-type=type"
120 Change the ELF file type in the ELF header to \fItype\fR. The
121 supported ELF types are the same as \fB\-\-input\-type\fR.
122 .IP \fB\-\-input\-osabi=\fR\fIosabi\fR 4
123 .IX Item "--input-osabi=osabi"
124 Set the matching input ELF file OSABI to \fIosabi\fR. If
125 \&\fB\-\-input\-osabi\fR isn\*(Aqt specified, it will match any ELF OSABIs.
126 .Sp
127 The supported ELF OSABIs are, \fInone\fR, \fIHPUX\fR, \fINetBSD\fR,
128 \&\fIGNU\fR, \fILinux\fR (alias for \fIGNU\fR),
129 \&\fISolaris\fR, \fIAIX\fR, \fIIrix\fR,
130 \&\fIFreeBSD\fR, \fITRU64\fR, \fIModesto\fR, \fIOpenBSD\fR, \fIOpenVMS\fR,
131 \&\fINSK\fR, \fIAROS\fR and \fIFenixOS\fR.
132 .IP \fB\-\-output\-osabi=\fR\fIosabi\fR 4
133 .IX Item "--output-osabi=osabi"
134 Change the ELF OSABI in the ELF header to \fIosabi\fR. The
135 supported ELF OSABI are the same as \fB\-\-input\-osabi\fR.
136 .IP \fB\-\-input\-abiversion=\fR\fIversion\fR 4
137 .IX Item "--input-abiversion=version"
138 Set the matching input ELF file ABIVERSION to \fIversion\fR.
139 \&\fIversion\fR must be between 0 and 255. If \fB\-\-input\-abiversion\fR
140 isn\*(Aqt specified, it will match any ELF ABIVERSIONs.
141 .IP \fB\-\-output\-abiversion=\fR\fIversion\fR 4
142 .IX Item "--output-abiversion=version"
143 Change the ELF ABIVERSION in the ELF header to \fIversion\fR.
144 \&\fIversion\fR must be between 0 and 255.
145 .IP \fB\-\-enable\-x86\-feature=\fR\fIfeature\fR 4
146 .IX Item "--enable-x86-feature=feature"
147 Set the \fIfeature\fR bit in program property in \fIexec\fR or \fIdyn\fR
148 ELF files with machine types of \fIi386\fR or \fIx86\-64\fR. The
149 supported features are, \fIibt\fR, \fIshstk\fR, \fIlam_u48\fR and
150 \&\fIlam_u57\fR.
151 .IP \fB\-\-disable\-x86\-feature=\fR\fIfeature\fR 4
152 .IX Item "--disable-x86-feature=feature"
153 Clear the \fIfeature\fR bit in program property in \fIexec\fR or
154 \&\fIdyn\fR ELF files with machine types of \fIi386\fR or \fIx86\-64\fR.
155 The supported features are the same as \fB\-\-enable\-x86\-feature\fR.
156 .Sp
157 Note: \fB\-\-enable\-x86\-feature\fR and \fB\-\-disable\-x86\-feature\fR
158 are available only on hosts with \fBmmap\fR support.
159 .IP \fB\-v\fR 4
160 .IX Item "-v"
161 .PD 0
162 .IP \fB\-\-version\fR 4
163 .IX Item "--version"
164 .PD
165 Display the version number of \fBelfedit\fR.
166 .IP \fB\-h\fR 4
167 .IX Item "-h"
168 .PD 0
169 .IP \fB\-\-help\fR 4
170 .IX Item "--help"
171 .PD
172 Display the command\-line options understood by \fBelfedit\fR.
173 .IP \fB@\fR\fIfile\fR 4
174 .IX Item "@file"
175 Read command\-line options from \fIfile\fR. The options read are
176 inserted in place of the original @\fIfile\fR option. If \fIfile\fR
177 does not exist, or cannot be read, then the option will be treated
178 literally, and not removed.
179 .Sp
180 Options in \fIfile\fR are separated by whitespace. A whitespace
181 character may be included in an option by surrounding the entire
182 option in either single or double quotes. Any character (including a
183 backslash) may be included by prefixing the character to be included
184 with a backslash. The \fIfile\fR may itself contain additional
185 @\fIfile\fR options; any such options will be processed recursively.
186 .SH "SEE ALSO"
187 .IX Header "SEE ALSO"
188 \&\fBreadelf\fR\|(1), and the Info entries for \fIbinutils\fR.
189 .SH COPYRIGHT
190 .IX Header "COPYRIGHT"
191 Copyright (c) 1991\-2025 Free Software Foundation, Inc.
192 .PP
193 Permission is granted to copy, distribute and/or modify this document
194 under the terms of the GNU Free Documentation License, Version 1.3
195 or any later version published by the Free Software Foundation;
196 with no Invariant Sections, with no Front\-Cover Texts, and with no
197 Back\-Cover Texts. A copy of the license is included in the
198 section entitled "GNU Free Documentation License".