{
    "content": [
        {
            "type": "text",
            "text": "# elfedit(1) (man)\n\n**Summary:** elfedit - update ELF header and program property of ELF files\n\n**Synopsis:** elfedit [--input-mach=machine]\n[--input-type=type]\n[--input-osabi=osabi]\n[--input-abiversion=version]\n--output-mach=machine\n--output-type=type\n--output-osabi=osabi\n--output-abiversion=version\n--enable-x86-feature=feature\n--disable-x86-feature=feature\n[-v|--version]\n[-h|--help]\nelffile...\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -v | — | — |  |\n| — | --version | — | Display the version number of elfedit. |\n| -h | — | — |  |\n| — | --help | — | Display the command-line options understood by elfedit. @file Read command-line options from file. The options read are  |\n\n## See Also\n\n- readelf(1)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (14 lines)\n- **DESCRIPTION** (7 lines)\n- **OPTIONS** (54 lines) — 4 subsections\n  - -v (1 lines)\n  - --version (2 lines)\n  - -h (1 lines)\n  - --help (13 lines)\n- **SEE ALSO** (2 lines)\n- **COPYRIGHT** (11 lines)\n\n## Full Content\n\n### NAME\n\nelfedit - update ELF header and program property of ELF files\n\n### SYNOPSIS\n\nelfedit [--input-mach=machine]\n[--input-type=type]\n[--input-osabi=osabi]\n[--input-abiversion=version]\n--output-mach=machine\n--output-type=type\n--output-osabi=osabi\n--output-abiversion=version\n--enable-x86-feature=feature\n--disable-x86-feature=feature\n[-v|--version]\n[-h|--help]\nelffile...\n\n### DESCRIPTION\n\nelfedit updates the ELF header and program property of ELF files which have the matching ELF\nmachine and file types.  The options control how and which fields in the ELF header and\nprogram property should be updated.\n\nelffile... are the ELF files to be updated.  32-bit and 64-bit ELF files are supported, as\nare archives containing ELF files.\n\n### OPTIONS\n\nThe long and short forms of options, shown here as alternatives, are equivalent. At least one\nof the --output-mach, --output-type, --output-osabi, --output-abiversion,\n--enable-x86-feature and --disable-x86-feature options must be given.\n\n--input-mach=machine\nSet the matching input ELF machine type to machine.  If --input-mach isn't specified, it\nwill match any ELF machine types.\n\nThe supported ELF machine types are, i386, IAMCU, L1OM, K1OM and x86-64.\n\n--output-mach=machine\nChange the ELF machine type in the ELF header to machine.  The supported ELF machine\ntypes are the same as --input-mach.\n\n--input-type=type\nSet the matching input ELF file type to type.  If --input-type isn't specified, it will\nmatch any ELF file types.\n\nThe supported ELF file types are, rel, exec and dyn.\n\n--output-type=type\nChange the ELF file type in the ELF header to type.  The supported ELF types are the same\nas --input-type.\n\n--input-osabi=osabi\nSet the matching input ELF file OSABI to osabi.  If --input-osabi isn't specified, it\nwill match any ELF OSABIs.\n\nThe supported ELF OSABIs are, none, HPUX, NetBSD, GNU, Linux (alias for GNU), Solaris,\nAIX, Irix, FreeBSD, TRU64, Modesto, OpenBSD, OpenVMS, NSK, AROS and FenixOS.\n\n--output-osabi=osabi\nChange the ELF OSABI in the ELF header to osabi.  The supported ELF OSABI are the same as\n--input-osabi.\n\n--input-abiversion=version\nSet the matching input ELF file ABIVERSION to version.  version must be between 0 and\n255.  If --input-abiversion isn't specified, it will match any ELF ABIVERSIONs.\n\n--output-abiversion=version\nChange the ELF ABIVERSION in the ELF header to version.  version must be between 0 and\n255.\n\n--enable-x86-feature=feature\nSet the feature bit in program property in exec or dyn ELF files with machine types of\ni386 or x86-64.  The supported features are, ibt, shstk, lamu48 and lamu57.\n\n--disable-x86-feature=feature\nClear the feature bit in program property in exec or dyn ELF files with machine types of\ni386 or x86-64.  The supported features are the same as --enable-x86-feature.\n\nNote: --enable-x86-feature and --disable-x86-feature are available only on hosts with\nmmap support.\n\n#### -v\n\n#### --version\n\nDisplay the version number of elfedit.\n\n#### -h\n\n#### --help\n\nDisplay the command-line options understood by elfedit.\n\n@file\nRead command-line options from file.  The options read are inserted in place of the\noriginal @file option.  If file does not exist, or cannot be read, then the option will\nbe treated literally, and not removed.\n\nOptions in file are separated by whitespace.  A whitespace character may be included in\nan option by surrounding the entire option in either single or double quotes.  Any\ncharacter (including a backslash) may be included by prefixing the character to be\nincluded with a backslash.  The file may itself contain additional @file options; any\nsuch options will be processed recursively.\n\n### SEE ALSO\n\nreadelf(1), and the Info entries for binutils.\n\n### COPYRIGHT\n\nCopyright (c) 1991-2022 Free Software Foundation, Inc.\n\nPermission is granted to copy, distribute and/or modify this document under the terms of the\nGNU Free Documentation License, Version 1.3 or any later version published by the Free\nSoftware Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-\nCover Texts.  A copy of the license is included in the section entitled \"GNU Free\nDocumentation License\".\n\n\n\nbinutils-2.38                                2025-12-03                                   ELFEDIT(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "elfedit",
        "section": "1",
        "mode": "man",
        "summary": "elfedit - update ELF header and program property of ELF files",
        "synopsis": "elfedit [--input-mach=machine]\n[--input-type=type]\n[--input-osabi=osabi]\n[--input-abiversion=version]\n--output-mach=machine\n--output-type=type\n--output-osabi=osabi\n--output-abiversion=version\n--enable-x86-feature=feature\n--disable-x86-feature=feature\n[-v|--version]\n[-h|--help]\nelffile...",
        "flags": [
            {
                "flag": "-v",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "Display the version number of elfedit."
            },
            {
                "flag": "-h",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": "--help",
                "arg": null,
                "description": "Display the command-line options understood by elfedit. @file Read command-line options from file. The options read are inserted in place of the original @file option. If file does not exist, or cannot be read, then the option will be treated literally, and not removed. 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. The file may itself contain additional @file options; any such options will be processed recursively."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "readelf",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/readelf/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 54,
                "subsections": [
                    {
                        "name": "-v",
                        "lines": 1,
                        "flag": "-v"
                    },
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    },
                    {
                        "name": "-h",
                        "lines": 1,
                        "flag": "-h"
                    },
                    {
                        "name": "--help",
                        "lines": 13,
                        "long": "--help"
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 11,
                "subsections": []
            }
        ]
    }
}