ELFEDIT(1)

πŸ“¦
version 2.45.50.20251209+3.5.3build1 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

πŸ¦‹ 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 are i386, IAMCU, L1OM, K1OM and x86-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 are rel, exec and dyn. 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-osabi isn't specified it will match any ELF OSABIs. the supported ELF OSABIs are: none, HPUX, NetBSD, GNU, Linux (which is an alias for GNU, yes she goes by two names, main character behaviour), Solaris, AIX, Irix, FreeBSD, TRU64, Modesto, OpenBSD, OpenVMS, NSK, AROS and FenixOS. 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-abiversion isn'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 in exec or dyn ELF files with machine types of i386 or x86-64. the supported features are ibt, shstk, lam_u48 and lam_u57. turning bits ON, we love to see it. πŸ”₯
  • --disable-x86-feature=feature β€” clears the feature bit in program property in exec or dyn ELF files with machine types of i386 or x86-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-feature and --disable-x86-feature are available only on hosts with mmap support. if your host doesn't have it, these two are simply not coming to the party. 😭
  • -v, --version β€” displays the version number of elfedit. like a little name tag. πŸŽ€
  • -h, --help β€” displays the command-line options understood by elfedit. she will explain herself. 🌸
  • @file β€” reads command-line options from file. the options that get read are inserted right in place of the original @file option. 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 (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