ELFEDIT(1)
π¦ ELFEDIT(1) π¦
elfedit is a GNU Development Tools thing, and honestly it's giving main character energy β¨
π NAME π
elfedit - update ELF header and program property of ELF files π
π§ 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 π
okay so elfedit updates the ELF header and program property of ELF files that have the matching ELF machine and file types π«Ά The options are what decide how, and which, fields in the ELF header and program property get updated. Iconic, right?
elffile... are the ELF files you want to update. Both 32-bit and 64-bit ELF files are supported, and so are archives that contain ELF files π¦
πΈ OPTIONS πΈ
The long and short forms of options are equivalent, so pick whichever vibes with you π You must give at least one of --output-mach, --output-type, --output-osabi, --output-abiversion, --enable-x86-feature and --disable-x86-feature, or it won't do anything.
--input-mach=machineβ sets the input ELF machine type that files have to match, so it only touches files with that machine type. If you leave it out, any ELF machine type matches π₯ The machine types you can use arei386,IAMCU,L1OM,K1OMandx86-64.--output-mach=machineβ changes the ELF machine type in the ELF header to machine. Same supported machine types as--input-machβ¨--input-type=typeβ sets the input ELF file type that files have to match. Leave it out and any ELF file type matches π¦ The file types you can use arerel,execanddyn.--output-type=typeβ changes the ELF file type in the ELF header to type. Same supported types as--input-typeπ--input-osabi=osabiβ sets the input ELF file OSABI that files have to match. No flag means any ELF OSABI matches π The OSABIs you can pick from arenone,HPUX,NetBSD,GNU,Linux(alias forGNU),Solaris,AIX,Irix,FreeBSD,TRU64,Modesto,OpenBSD,OpenVMS,NSK,AROSandFenixOS.--output-osabi=osabiβ changes the ELF OSABI in the ELF header to osabi. Same supported OSABIs as--input-osabiπ--input-abiversion=versionβ sets the input ELF file ABIVERSION that files have to match. version has to be between0and255. Skip it and any ELF ABIVERSION matches π--output-abiversion=versionβ changes the ELF ABIVERSION in the ELF header to version. Again, version has to be between0and255π--enable-x86-feature=featureβ sets the feature bit in program property, but only inexecordynELF files with machine typesi386orx86-64π«Ά The features you can enable areibt,shstk,lam_u48andlam_u57.--disable-x86-feature=featureβ clears the feature bit in program property, same rules as above:execordynELF files with machine typesi386orx86-64π The supported features are the same as--enable-x86-feature.
Heads up, bestie:--enable-x86-featureand--disable-x86-featureonly work on hosts with mmap support π
-v,--versionβ shows you the version number ofelfeditπ§-h,--helpβ shows you the command-line optionselfeditunderstands π@fileβ reads command-line options from file. Whatever it reads gets slotted in right where the@fileoption was. If file doesn't exist or can't be read, then@filegets treated literally and doesn't get removed π Options inside file are split up by whitespace. If you want a whitespace character inside an option, wrap the whole option in single or double quotes. Any character (backslash included) can be used by putting a backslash in front of it. The file can have more@fileoptions of its own too, and those get processed recursively πΈ
π¦ SEE ALSO π¦
readelf(1), and the Info entries for binutils π
π COPYRIGHT π
Copyright (c) 1991-2025 Free Software Foundation, Inc.
You're allowed 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. There are no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section called "GNU Free Documentation License" β¨
Okay bestie, that's the whole tea π«Ά Sourced from binutils-2.45, dated 2025-12-03, ELFEDIT(1) forever ππ
π¦ where this page comes from
- ubuntu questing: binutils-common 2.45-7ubuntu1.2
- ubuntu questing: binutils-x86-64-linux-gnu 2.45-7ubuntu1.2
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms