ELFEDIT(1)
π¦ elfedit β GNU Development Tools π¦
okay bestie, sit down, hydrate, because we're about to talk about elfedit β yes it's from the GNU Development Tools crew, and yes it's the manual page for it, and yes I'm about to make ELF headers sound like a group chat. π
β¨ NAME β¨
elfedit β update ELF header and program property of ELF files. that's it. that's the whole job. she edits headers. she edits program properties. she does not text back. π
β¨ SYNOPSIS β¨
elfedit [--input-mach=machine]
[--input-type=type]
[--input-osabi=osabi]
[--input-abiversion=version]
--output-mach=machine
--output-type=type
--output-osabi=osabi
--output-abiversion=version
--enable-x86-feature=feature
--disable-x86-feature=feature
[-v|--version]
[-h|--help]
elffile...
β¨ DESCRIPTION β¨
so elfedit updates the ELF header and the program property of ELF files β but only the ones that match the ELF machine and file types you asked for. the options are literally the whole vibe control: they decide how and which fields in the ELF header and program property get updated. π
and then elffile...? that's your list of ELF files to be updated. both 32-bit and 64-bit ELF files are supported, and so are archives containing ELF files. she's flexible. she contains multitudes. π
β¨ OPTIONS β¨
the long and short forms of options, shown here as alternatives, are equivalent β no cap, pick whichever one sparks joy. and listen: at least one of --output-mach, --output-type, --output-osabi, --output-abiversion, --enable-x86-feature and --disable-x86-feature must be given. you can't just show up and do nothing, that's not the energy. π
--input-mach=machineβ sets the matching input ELF machine type to machine. if you don't specify--input-mach, it'll match any ELF machine types, she's not picky. the supported ELF machine types arei386,IAMCU,L1OM,K1OMandx86-64. π¦--output-mach=machineβ changes the ELF machine type in the ELF header to machine. supported ELF machine types are the exact same ones as--input-mach, so:i386,IAMCU,L1OM,K1OM,x86-64. π--input-type=typeβ sets the matching input ELF file type to type. skip it and it matches any ELF file types. the supported ELF file types arerel,execanddyn. three icons, no notes. β--output-type=typeβ changes the ELF file type in the ELF header to type. supported ELF types are the same as--input-type:rel,exec,dyn. β¨--input-osabi=osabiβ sets the matching input ELF file OSABI to osabi. if--input-osabiisn't specified it will match any ELF OSABIs. the supported ELF OSABIs are:none,HPUX,NetBSD,GNU,Linux(which is an alias forGNU, yes she goes by two names, main character behaviour),Solaris,AIX,Irix,FreeBSD,TRU64,Modesto,OpenBSD,OpenVMS,NSK,AROSandFenixOS. that's a whole guest list fr fr. π«Ά--output-osabi=osabiβ changes the ELF OSABI in the ELF header to osabi. supported ELF OSABI are the same as--input-osabi. π--input-abiversion=versionβ sets the matching input ELF file ABIVERSION to version. and heads up: version must be between 0 and 255. if--input-abiversionisn't specified, it will match any ELF ABIVERSIONs. π--output-abiversion=versionβ changes the ELF ABIVERSION in the ELF header to version. same rule bestie: version must be between 0 and 255. π’--enable-x86-feature=featureβ sets the feature bit in program property inexecordynELF files with machine types ofi386orx86-64. the supported features areibt,shstk,lam_u48andlam_u57. turning bits ON, we love to see it. π₯--disable-x86-feature=featureβ clears the feature bit in program property inexecordynELF files with machine types ofi386orx86-64. supported features are the same as--enable-x86-feature:ibt,shstk,lam_u48,lam_u57. clearing bits, also valid, also iconic. π
note bestie:--enable-x86-featureand--disable-x86-featureare available only on hosts withmmapsupport. if your host doesn't have it, these two are simply not coming to the party. π
-v,--versionβ displays the version number ofelfedit. like a little name tag. π-h,--helpβ displays the command-line options understood byelfedit. she will explain herself. πΈ@fileβ reads command-line options from file. the options that get read are inserted right in place of the original@fileoption. and here's the thing: if file doesn't exist, or it can't be read, then the option is treated literally and not removed. (yes she just... leaves it there. awkward but true. π)
options inside file are separated by whitespace. you can include a whitespace character in an option by wrapping the entire option in either single or double quotes. and any character β including a backslash β can be included by putting a backslash in front of it. the file may itself contain additional @file options, and any such options will be processed recursively. it's giving nesting dolls. it's giving inception. π
β¨ SEE ALSO β¨
readelf(1), and the Info entries for binutils. go read those too, she's not jealous, she's supportive. π
β¨ COPYRIGHT β¨
Copyright (c) 1991-2025 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. a copy of the license is included in the section entitled "GNU Free Documentation License". π«Ά
and that's the whole page bestie, ty for coming to my ted talk, this was binutils-2.45.50, dated 2026-01-13, mwah π slay β¨
π¦ where this page comes from
- ubuntu resolute: binutils-m68hc1x 1:2.45.50.20251209+3.5.3build1 Β· GPL-3.0-or-later
- ubuntu stonking: binutils-m68hc1x 1:2.45.50.20251209+3.5.3build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms