ELFEDIT(1)

πŸ“¦ version 12.2.0, in nixpkgs unstable

πŸ¦‹ elfedit(1) β€” GNU Development Tools πŸ¦‹

okay so bestie, buckle up, we're doing the elfedit page from the GNU Development Tools manual (that's the manual name, iykyk) ✨


πŸ’… NAME

elfedit β€” updates the ELF header of ELF files. literally that's the whole gig πŸŽ€


🌸 SYNOPSIS

elfedit [--input-mach=machine]
        [--input-type=type]
        [--input-osabi=osabi]
        --output-mach=machine
        --output-type=type
        --output-osabi=osabi
        [-v|--version]
        [-h|--help]
        elffile...

πŸ’– DESCRIPTION

so elfedit updates the ELF header of ELF files that have the matching ELF machine and file types. the options are the whole control panel β€” they decide how the fields in the ELF header get updated and which ones, periodt πŸ‘‘

elffile... are the ELF files to be updated. 32-bit AND 64-bit ELF files are supported, no cap β€” and so are archives that contain ELF files 🫢


✨ OPTIONS ✨

the long and short forms of options, shown here as alternatives, are equivalent. and listen: at least one of --output-mach, --output-type and --output-osabi must be given β€” like, you can't just vibe in here with nothing 😭

  • --input-mach=machine β€” sets the matching input ELF machine type to machine. if --input-mach isn't specified, it'll match any ELF machine types, she's flexible like that πŸ’β€β™€οΈ 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. the supported ELF machine types are the same as --input-mach. glow-up time πŸ”₯
  • --input-type=type β€” sets the matching input ELF file type to type. if --input-type isn't specified, it'll match any ELF file types. The supported ELF file types are rel, exec and dyn.
  • --output-type=type β€” changes the ELF file type in the ELF header to type. the supported ELF types are the same as --input-type πŸ’«
  • --input-osabi=osabi β€” sets the matching input ELF file OSABI to osabi. if --input-osabi isn't specified, it'll match any ELF OSABIs. The supported ELF OSABIs are none, HPUX, NetBSD, GNU, Linux (alias for GNU), Solaris, AIX, Irix, FreeBSD, TRU64, Modesto, OpenBSD, OpenVMS, NSK, AROS and FenixOS. that's a whole roster, she contains multitudes 🌈
  • --output-osabi=osabi β€” changes the ELF OSABI in the ELF header to osabi. the supported ELF OSABI are the same as --input-osabi. slay πŸŽ€
  • -v, --version β€” displays the version number of elfedit. tiny flex, we love to see it ⭐
  • -h, --help β€” displays the command line options understood by elfedit. your little cheat sheet fr fr πŸ“–
  • @file β€” reads command-line options from file. the options read get inserted in place of the original @file option. if file doesn't exist, or can't be read, then the option is treated literally, and not removed. no silent vanishing acts here πŸ™ˆ Options in file are separated by whitespace. a whitespace character may be included in an option by surrounding the entire option in either single or double quotes. any character (including a backslash) may be included by prefixing the character to be included with a backslash. and plot twist: the file may itself contain additional @file options β€” any such options will be processed recursively πŸŒ€ (it's giving inception, honestly)

πŸ‘€ SEE ALSO

readelf(1), and the Info entries for binutils. go read those too, bestie, it's giving homework but the fun kind πŸ’œ


Copyright (c) 1991-2018 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".


aaaand that's the whole page!! 🧚 this one's from binutils-2.30, dated 2018-01-27 β€” mwah, drink some water, and go edit those ELF headers responsibly πŸ’–βœ¨

πŸ“¦ where this page comes from