ELFEDIT(1)

πŸ“¦ version 2.45, in ubuntu questing

πŸ¦‹ 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 are i386, IAMCU, L1OM, K1OM and x86-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 are rel, exec and dyn.
  • --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 are none, HPUX, NetBSD, GNU, Linux (alias for GNU), Solaris, AIX, Irix, FreeBSD, TRU64, Modesto, OpenBSD, OpenVMS, NSK, AROS and FenixOS.
  • --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 between 0 and 255. 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 between 0 and 255 πŸ’…
  • --enable-x86-feature=feature β€” sets the feature bit in program property, but only in exec or dyn ELF files with machine types i386 or x86-64 🫢 The features you can enable are ibt, shstk, lam_u48 and lam_u57.
  • --disable-x86-feature=feature β€” clears the feature bit in program property, same rules as above: exec or dyn ELF files with machine types i386 or x86-64 πŸ™ˆ The supported features are the same as --enable-x86-feature.
Heads up, bestie: --enable-x86-feature and --disable-x86-feature only work on hosts with mmap support 😭
  • -v, --version β€” shows you the version number of elfedit 🧚
  • -h, --help β€” shows you the command-line options elfedit understands πŸ’œ
  • @file β€” reads command-line options from file. Whatever it reads gets slotted in right where the @file option was. If file doesn't exist or can't be read, then @file gets 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 @file options of its own too, and those get processed recursively 🌸

πŸ¦‹ SEE ALSO πŸ¦‹

readelf(1), and the Info entries for binutils πŸ“š

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