1d29b2c44Sab# 2d29b2c44Sab# CDDL HEADER START 3d29b2c44Sab# 4d29b2c44Sab# The contents of this file are subject to the terms of the 5d29b2c44Sab# Common Development and Distribution License (the "License"). 6d29b2c44Sab# You may not use this file except in compliance with the License. 7d29b2c44Sab# 8d29b2c44Sab# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9d29b2c44Sab# or http://www.opensolaris.org/os/licensing. 10d29b2c44Sab# See the License for the specific language governing permissions 11d29b2c44Sab# and limitations under the License. 12d29b2c44Sab# 13d29b2c44Sab# When distributing Covered Code, include this CDDL HEADER in each 14d29b2c44Sab# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15d29b2c44Sab# If applicable, add the following below this CDDL HEADER, with the 16d29b2c44Sab# fields enclosed by brackets "[]" replaced with your own identifying 17d29b2c44Sab# information: Portions Copyright [yyyy] [name of copyright owner] 18d29b2c44Sab# 19d29b2c44Sab# CDDL HEADER END 20d29b2c44Sab# 21d29b2c44Sab 22d29b2c44Sab# 23*4f680cc6SAli Bahrami# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24d29b2c44Sab# Use is subject to license terms. 25d29b2c44Sab# 26d29b2c44Sab 27d29b2c44Sab@ _START_ 28d29b2c44Sab 29d29b2c44Sab# Message file for elfedit 'ehdr' module 30d29b2c44Sab 31d29b2c44Sab@ MSG_ID_ELFEDIT_EHDR 32d29b2c44Sab 33d29b2c44Sab 34d29b2c44Sab# Debug messages 35d29b2c44Sab@ MSG_DEBUG_E_S_OK "ehdr.%s: value unchanged: %s\n" 36d29b2c44Sab@ MSG_DEBUG_E_S_CHG "ehdr.%s: change from %s to %s\n" 37d29b2c44Sab@ MSG_DEBUG_E_D_OK "ehdr.%s: value unchanged: %d\n" 38d29b2c44Sab@ MSG_DEBUG_E_D_CHG "ehdr.%s: change from %d to %d\n" 39d29b2c44Sab@ MSG_DEBUG_E_LLX_OK "ehdr.%s: value unchanged: %#llx\n" 40d29b2c44Sab@ MSG_DEBUG_E_LLX_CHG "ehdr.%s: change from %#llx to %#llx\n" 41d29b2c44Sab@ MSG_DEBUG_EI_S_S_OK "ehdr.e_ident[%s]: value unchanged: %s\n"; 42d29b2c44Sab@ MSG_DEBUG_EI_S_S_CHG "ehdr.e_ident[%s]: change from %s to %s\n" 43d29b2c44Sab@ MSG_DEBUG_EI_D_X_OK "ehdr.e_ident[%d]: value unchanged: %#x\n" 44d29b2c44Sab@ MSG_DEBUG_EI_D_X_CHG "ehdr.e_ident[%d]: change from %#x to %#x\n" 45d29b2c44Sab@ MSG_DEBUG_SHDR0_D_OK "shdr[0].%s: value unchanged: %d\n" 46d29b2c44Sab@ MSG_DEBUG_SHDR0_D_CHG "shdr[0].%s: change from %d to %d\n" 47d29b2c44Sab@ MSG_DEBUG_NOTSTRTAB "ehdr.%s: ELF warning: section is not a \ 48d29b2c44Sab string table: %d\n" 49d29b2c44Sab 50d29b2c44Sab 51d29b2c44Sab# Module description 52d29b2c44Sab 53d29b2c44Sab@ MSG_MOD_DESC "ELF Header" 54d29b2c44Sab 55d29b2c44Sab 56d29b2c44Sab# 1-line description strings 57d29b2c44Sab 58d29b2c44Sab@ MSG_DESC_DUMP "Dump ELF Header" 59d29b2c44Sab@ MSG_DESC_E_IDENT "ELF Identification" 60d29b2c44Sab@ MSG_DESC_E_TYPE "Object File Type" 61d29b2c44Sab@ MSG_DESC_E_MACHINE "Machine Architecture" 62d29b2c44Sab@ MSG_DESC_E_VERSION "Object File Version" 63d29b2c44Sab@ MSG_DESC_E_ENTRY "Starting Virtual Address" 64d29b2c44Sab@ MSG_DESC_E_PHOFF "Program Header Table File Offset" 65d29b2c44Sab@ MSG_DESC_E_SHOFF "Section Header Table File Offset" 66d29b2c44Sab@ MSG_DESC_E_FLAGS "Processor-Specific Flags" 67d29b2c44Sab@ MSG_DESC_E_EHSIZE "ELF Header's Size" 68d29b2c44Sab@ MSG_DESC_E_PHENTSIZE "Program Header Table Entry Size" 69d29b2c44Sab@ MSG_DESC_E_PHNUM "Number Program Header Entries" 70d29b2c44Sab@ MSG_DESC_E_SHENTSIZE "Section Header Table Entry Size" 71d29b2c44Sab@ MSG_DESC_E_SHNUM "Number Section Header Entries" 72d29b2c44Sab@ MSG_DESC_E_SHSTRNDX "Section Name String Table Index" 73d29b2c44Sab 74d29b2c44Sab@ MSG_DESC_EI_MAG0 "File Identification Byte #1" 75d29b2c44Sab@ MSG_DESC_EI_MAG1 "File Identification Byte #2" 76d29b2c44Sab@ MSG_DESC_EI_MAG2 "File Identification Byte #3" 77d29b2c44Sab@ MSG_DESC_EI_MAG3 "File Identification Byte #4" 78d29b2c44Sab@ MSG_DESC_EI_CLASS "File Class (System Word Size)" 79d29b2c44Sab@ MSG_DESC_EI_DATA "Data Encoding (Byte Order)" 80d29b2c44Sab@ MSG_DESC_EI_VERSION "File Version" 81d29b2c44Sab@ MSG_DESC_EI_OSABI "Operating System / ABI Identification" 82d29b2c44Sab@ MSG_DESC_EI_ABIVERSION "ABI version" 83d29b2c44Sab 84d29b2c44Sab# Command option description strings 85d29b2c44Sab 86d29b2c44Sab@ MSG_OPTDESC_SHNDX "\ 87d29b2c44Sab Interpret the sec argument as a section index rather than\n\ 88d29b2c44Sab as a section name. section can be one of the well known SHN_\n\ 89d29b2c44Sab symbolic constants, or any integer.\n" 90d29b2c44Sab 91d29b2c44Sab@ MSG_OPTDESC_SHTYP "\ 92d29b2c44Sab Interpret the sec argument as a section type rather than\n\ 93d29b2c44Sab as a section name. section can be one of the well known SHT_\n\ 94d29b2c44Sab symbolic constants, or any integer.\n" 95d29b2c44Sab 96d29b2c44Sab# Command argument description strings 97d29b2c44Sab 98d29b2c44Sab@ MSG_ARGDESC_E_IDENT_NDX "\ 99d29b2c44Sab Index of element of e_ident[] array. This can be\n\ 100d29b2c44Sab an integer value, or any of the EI_ symbolic constants\n\ 101d29b2c44Sab defined in /usr/include/sys/elf.h.\n" 102d29b2c44Sab 103d29b2c44Sab@ MSG_ARGDESC_E_IDENT_VALUE "\ 104d29b2c44Sab New value for element of e_ident[] array. This can be\n\ 105d29b2c44Sab an integer value, or any symbolic constants defined in\n\ 106d29b2c44Sab /usr/include/sys/elf.h that apply to the selected item.\n" 107d29b2c44Sab 108d29b2c44Sab@ MSG_ARGDESC_E_TYPE_VALUE "\ 109d29b2c44Sab New value for type of the ELF object. This can be\n\ 110d29b2c44Sab an integer value, or any of the ET_ symbolic constants\n\ 111d29b2c44Sab defined in /usr/include/sys/elf.h.\n" 112d29b2c44Sab 113d29b2c44Sab@ MSG_ARGDESC_E_MACHINE_VALUE "\ 114d29b2c44Sab New value for architecture of the ELF object. This can be\n\ 115d29b2c44Sab an integer value, or any of the EM_ symbolic constants\n\ 116d29b2c44Sab defined in /usr/include/sys/elf.h.\n" 117d29b2c44Sab 118d29b2c44Sab@ MSG_ARGDESC_E_VERSION_VALUE "\ 119d29b2c44Sab New value for version of the ELF object. This can be\n\ 120d29b2c44Sab an integer value, or any of the EV_ symbolic constants\n\ 121d29b2c44Sab defined in /usr/include/sys/elf.h.\n" 122d29b2c44Sab 123d29b2c44Sab@ MSG_ARGDESC_E_ENTRY_VALUE "\ 124d29b2c44Sab New value for virtual address to which the system first transfers control.\n" 125d29b2c44Sab 126d29b2c44Sab@ MSG_ARGDESC_E_PHOFF_VALUE "\ 127d29b2c44Sab New value for program header table's file offset.\n" 128d29b2c44Sab 129d29b2c44Sab@ MSG_ARGDESC_E_SHOFF_VALUE "\ 130d29b2c44Sab New value for section header table's file offset.\n" 131d29b2c44Sab 132d29b2c44Sab@ MSG_ARGDESC_E_FLAGS_VALUE "\ 133d29b2c44Sab New value for processor-specific flags. This can be an integer\n\ 134d29b2c44Sab value, or any of the EF_ symbolic constants defined in the\n\ 135d29b2c44Sab system header files\n" 136d29b2c44Sab 137d29b2c44Sab@ MSG_ARGDESC_E_EHSIZE_VALUE "\ 138d29b2c44Sab New value for size of ELF header, in bytes.\n" 139d29b2c44Sab 140d29b2c44Sab@ MSG_ARGDESC_E_PHENTSIZE_VALUE "\ 141d29b2c44Sab New value for size of one entry in the file's program header table,\n\ 142d29b2c44Sab in bytes.\n" 143d29b2c44Sab 144d29b2c44Sab@ MSG_ARGDESC_E_PHNUM_VALUE "\ 145d29b2c44Sab New value for number of entries in the program header table.\n" 146d29b2c44Sab 147d29b2c44Sab@ MSG_ARGDESC_E_SHENTSIZE_VALUE "\ 148d29b2c44Sab New value for size of one entry in the file's section header table,\n\ 149d29b2c44Sab in bytes.\n" 150d29b2c44Sab 151d29b2c44Sab@ MSG_ARGDESC_E_SHNUM_VALUE "\ 152d29b2c44Sab New value for number of entries in the section header table.\n" 153d29b2c44Sab 154d29b2c44Sab@ MSG_ARGDESC_E_SHSTRNDX_SEC "\ 155d29b2c44Sab String table section containing section name strings.\n\ 156d29b2c44Sab By default, this argument is interpreted as the name\n\ 157d29b2c44Sab of the desired section. The section index of the first\n\ 158d29b2c44Sab section with the specified name is used.\n\ 159d29b2c44Sab \n\ 160d29b2c44Sab If -shndx is set, then sec is a section index, and is\n\ 161d29b2c44Sab interpreted as an integer, or one of the well known SHN_\n\ 162d29b2c44Sab symbolic constant names.\n\ 163d29b2c44Sab \n\ 164d29b2c44Sab If -shtyp is set, then sec is a section type, and is\n\ 165d29b2c44Sab interpreted as an integer, or one of the well known SHT_\n\ 166d29b2c44Sab symbolic constant names. The section index of the first\n\ 167d29b2c44Sab section with the specified type is used.\n" 168d29b2c44Sab 169d29b2c44Sab@ MSG_ARGDESC_EI_MAG0_VALUE "\ 170d29b2c44Sab New value for first byte of file magic number.\n" 171d29b2c44Sab 172d29b2c44Sab@ MSG_ARGDESC_EI_MAG1_VALUE "\ 173d29b2c44Sab New value for second byte of file magic number.\n" 174d29b2c44Sab 175d29b2c44Sab@ MSG_ARGDESC_EI_MAG2_VALUE "\ 176d29b2c44Sab New value for third byte of file magic number.\n" 177d29b2c44Sab 178d29b2c44Sab@ MSG_ARGDESC_EI_MAG3_VALUE "\ 179d29b2c44Sab New value for fourth byte of file magic number.\n" 180d29b2c44Sab 181d29b2c44Sab@ MSG_ARGDESC_EI_CLASS_VALUE "\ 182d29b2c44Sab New value for file's class. This can be an integer value, or any of\n\ 183d29b2c44Sab the ELFCLASS symbolic constants defined in /usr/include/sys/elf.h.\n" 184d29b2c44Sab 185d29b2c44Sab@ MSG_ARGDESC_EI_DATA_VALUE "\ 186d29b2c44Sab New value for file's data encoding. This can be an integer\n\ 187d29b2c44Sab value, or any ELFDATA symbolic constants defined in\n\ 188d29b2c44Sab /usr/include/sys/elf.h.\n" 189d29b2c44Sab 190d29b2c44Sab# Note: EI_VERSION uses the same string as E_VERSION, above 191d29b2c44Sab 192d29b2c44Sab@ MSG_ARGDESC_EI_OSABI_VALUE "\ 193d29b2c44Sab New value for ABI identification of the ELF object. This can be\n\ 194d29b2c44Sab an integer value, or any of the ELFOSABI_ symbolic constants\n\ 195d29b2c44Sab defined in /usr/include/sys/elf.h.\n" 196d29b2c44Sab 197d29b2c44Sab@ MSG_ARGDESC_EI_ABIVERSION_VALUE "\ 198d29b2c44Sab New value for version of the ABI to which the object is targeted.\n" 199d29b2c44Sab 200d29b2c44Sab 201d29b2c44Sab# Help strings 202d29b2c44Sab 203d29b2c44Sab@ MSG_HELP_DUMP " \ 204d29b2c44Sab The ehdr:dump command is used to display the contents of\n\ 205d29b2c44Sab the ELF header using the same style used by the elfdump program.\n" 206d29b2c44Sab 207d29b2c44Sab@ MSG_HELP_E_IDENT " \ 208d29b2c44Sab Examine or modify ELF Identification information for the\n\ 209d29b2c44Sab object. This information is found in the e_ident array in\n\ 210d29b2c44Sab the ELF header.\n\ 211d29b2c44Sab \n\ 212d29b2c44Sab If ehdr:e_ident is called without any argument, all values\n\ 213d29b2c44Sab the value in e_ident are shown. If called with the index\n\ 214d29b2c44Sab argument, the selected element of e_ident is shown. If also\n\ 215d29b2c44Sab called with the value argument, the selected e_ident element\n\ 216d29b2c44Sab is updated with the new value.\n" 217d29b2c44Sab 218d29b2c44Sab 219d29b2c44Sab@ MSG_HELP_E_TYPE " \ 220d29b2c44Sab Examine or modify the object file type. This information is\n\ 221d29b2c44Sab found in the e_type field of the ELF header.\n\ 222d29b2c44Sab \n\ 223d29b2c44Sab If ehdr:e_type is called without an argument, the value of\n\ 224d29b2c44Sab e_type is shown. If called with the value argument, the\n\ 225d29b2c44Sab e_type field is updated with the new value.\n\ 226d29b2c44Sab \n\ 227d29b2c44Sab Note: Changing the type code of an object does not change the\n\ 228d29b2c44Sab other contents of the file, and is unlikely to produce a usable\n\ 229d29b2c44Sab ELF object.\n" 230d29b2c44Sab 231d29b2c44Sab 232d29b2c44Sab@ MSG_HELP_E_MACHINE " \ 233d29b2c44Sab Examine or modify the required architecture of the object.\n\ 234d29b2c44Sab This information is found in the e_machine field of the\n\ 235d29b2c44Sab ELF header.\n\ 236d29b2c44Sab \n\ 237d29b2c44Sab If ehdr:e_machine is called without an argument, the value of\n\ 238d29b2c44Sab e_machine is shown. If called with the value argument, the\n\ 239d29b2c44Sab e_machine field is updated with the new value.\n\ 240d29b2c44Sab \n\ 241d29b2c44Sab Note: Changing the architecture code of an object does not change the\n\ 242d29b2c44Sab other contents of the file, and is unlikely to produce a usable\n\ 243d29b2c44Sab ELF object.\n" 244d29b2c44Sab 245d29b2c44Sab 246d29b2c44Sab@ MSG_HELP_E_VERSION " \ 247d29b2c44Sab Examine or modify the object file version. This information\n\ 248d29b2c44Sab is found in the e_version field of the ELF header.\n\ 249d29b2c44Sab \n\ 250d29b2c44Sab If ehdr:e_version is called without an argument, the value of\n\ 251d29b2c44Sab e_version is shown. If called with the value argument, the\n\ 252d29b2c44Sab e_version field is updated with the new value.\n\ 253d29b2c44Sab \n\ 254d29b2c44Sab Note: The e_ident[EI_VERSION] element of the ELF header\n\ 255d29b2c44Sab identification array also contains a version value. These\n\ 256d29b2c44Sab two fields should be set to the same value. Use the\n\ 257d29b2c44Sab ehdr:ei_version command to change that element.\n" 258d29b2c44Sab 259d29b2c44Sab 260d29b2c44Sab@ MSG_HELP_E_ENTRY " \ 261d29b2c44Sab Examine or modify the virtual address to which the system\n\ 262d29b2c44Sab first transfers control, thus starting the process. This\n\ 263d29b2c44Sab information is found in the e_entry field of the ELF header.\n\ 264d29b2c44Sab If the file has no associated entry point, this member\n\ 265d29b2c44Sab holds zero.\n\ 266d29b2c44Sab \n\ 267d29b2c44Sab If ehdr:e_entry is called without an argument, the value of\n\ 268d29b2c44Sab e_entry is shown. If called with the value argument, the\n\ 269d29b2c44Sab e_entry field is updated with the new value.\n\ 270d29b2c44Sab \n\ 271d29b2c44Sab Note: The entry point of an object is highly system\n\ 272d29b2c44Sab dependent. Changing it is likely to produce an object that\n\ 273d29b2c44Sab does not run properly.\n" 274d29b2c44Sab 275d29b2c44Sab 276d29b2c44Sab@ MSG_HELP_E_PHOFF " \ 277d29b2c44Sab Examine or modify the program header table's file offset.\n\ 278d29b2c44Sab This information is found in the e_phoff field of the\n\ 279d29b2c44Sab ELF header. If the file has no program header table, this\n\ 280d29b2c44Sab member holds zero.\n\ 281d29b2c44Sab \n\ 282d29b2c44Sab If ehdr:e_phoff is called without an argument, the value of\n\ 283d29b2c44Sab e_phoff is shown. If called with the value argument, the\n\ 284d29b2c44Sab e_phoff field is updated with the new value.\n\ 285d29b2c44Sab \n\ 286d29b2c44Sab Note: Changing the e_phoff field of an object does not change\n\ 287d29b2c44Sab the actual layout of the file or move the program header table.\n\ 288d29b2c44Sab As such, changing this value is likely to produce an unusable\n\ 289d29b2c44Sab ELF object.\n" 290d29b2c44Sab 291d29b2c44Sab 292d29b2c44Sab@ MSG_HELP_E_SHOFF " \ 293d29b2c44Sab Examine or modify the section header table's file offset.\n\ 294d29b2c44Sab This information is found in the e_shoff field of the\n\ 295d29b2c44Sab ELF header. If the file has no section header table, this\n\ 296d29b2c44Sab member holds zero.\n\ 297d29b2c44Sab \n\ 298d29b2c44Sab If ehdr:e_shoff is called without an argument, the value of\n\ 299d29b2c44Sab e_shoff is shown. If called with the value argument, the\n\ 300d29b2c44Sab e_shoff field is updated with the new value.\n\ 301d29b2c44Sab \n\ 302d29b2c44Sab Note: Changing the e_shoff field of an object does not change\n\ 303d29b2c44Sab the actual layout of the file or move the section header table.\n\ 304d29b2c44Sab As such, changing this value is likely to produce an unusable\n\ 305d29b2c44Sab ELF object.\n" 306d29b2c44Sab 307d29b2c44Sab 308d29b2c44Sab@ MSG_HELP_E_FLAGS " \ 309d29b2c44Sab Examine or modify the processor specific flags associated\n\ 310d29b2c44Sab with the file. This information is found in the e_flags\n\ 311d29b2c44Sab field of the ELF header.\n\ 312d29b2c44Sab \n\ 313d29b2c44Sab If ehdr:e_flags is called without an argument, the value of\n\ 314d29b2c44Sab e_flags is shown. If called with one or more flag_value\n\ 315d29b2c44Sab arguments, the the following steps are taken:\n\ 316d29b2c44Sab \n \ 317d29b2c44Sab o\tAll the flag_value arguments are OR'd together.\n\ 318d29b2c44Sab \n \ 319d29b2c44Sab o\tIf the -cmp option has been specified, the new value\n\ 320d29b2c44Sab \tis complemented.\n\ 321d29b2c44Sab \n \ 322d29b2c44Sab o\tThe e_flags field of the ELF header is updated with\n\ 323d29b2c44Sab \tthe new value. If -and is specified, the new value is\n\ 324d29b2c44Sab \tAND'd against the existing value. If -or is specified,\n\ 325d29b2c44Sab \tthe new value is OR'd against the existing value. If\n\ 326d29b2c44Sab \tneither -and or -or are specified, the new value replaces\n\ 327d29b2c44Sab \tthe existing value.\n\ 328d29b2c44Sab \n\ 329d29b2c44Sab Note: Changing the e_flags field of an object does not change\n\ 330d29b2c44Sab the code contained in the file. Setting a flag that implies\n\ 331d29b2c44Sab an ability the existing code cannot support will produce an\n\ 332d29b2c44Sab unusable ELF object.\n" 333d29b2c44Sab 334d29b2c44Sab 335d29b2c44Sab@ MSG_HELP_E_EHSIZE " \ 336d29b2c44Sab Examine or modify the size of the ELF header. This information\n\ 337d29b2c44Sab is found in the e_ehsize field of the ELF header.\n\ 338d29b2c44Sab \n\ 339d29b2c44Sab If ehdr:e_ehsize is called without an argument, the value of\n\ 340d29b2c44Sab e_ehsize is shown. If called with the value argument, the\n\ 341d29b2c44Sab e_ehsize field is updated with the new value.\n\ 342d29b2c44Sab \n\ 343d29b2c44Sab Note: Changing the e_ehsize field of the ELF header does not\n\ 344d29b2c44Sab change the size of the actual ELF header data structure. Setting\n\ 345d29b2c44Sab it to a different value is likely to produce an unusable ELF object.\n" 346d29b2c44Sab 347d29b2c44Sab 348d29b2c44Sab@ MSG_HELP_E_PHENTSIZE " \ 349d29b2c44Sab Examine or modify the size of one entry in the file's program\n\ 350d29b2c44Sab header table. This information is found in the e_phentsize\n\ 351d29b2c44Sab field of the ELF header.\n\ 352d29b2c44Sab \n\ 353d29b2c44Sab If ehdr:e_phentsize is called without an argument, the value of\n\ 354d29b2c44Sab e_phentsize is shown. If called with the value argument, the\n\ 355d29b2c44Sab e_phentsize field is updated with the new value.\n\ 356d29b2c44Sab \n\ 357d29b2c44Sab Note: Changing the e_phentsize field of the ELF header does\n\ 358d29b2c44Sab not change the size of the actual program header array elements.\n\ 359d29b2c44Sab Setting it to a different value is likely to produce an unusable\n\ 360d29b2c44Sab ELF object.\n" 361d29b2c44Sab 362d29b2c44Sab 363d29b2c44Sab@ MSG_HELP_E_PHNUM " \ 364d29b2c44Sab Examine or modify the number of entries in the program header\n\ 365d29b2c44Sab table. This information is found in the e_phnum field of the\n\ 366d29b2c44Sab ELF header, or in the sh_link field of the first section header\n\ 367d29b2c44Sab in the case of extended program indexes.\n\ 368d29b2c44Sab \n\ 369d29b2c44Sab If the number of program headers is greater than or equal\n\ 370d29b2c44Sab to PN_XNUM (0xffff), e_phnum has the value PN_XNUM, and the\n\ 371d29b2c44Sab actual number of program header table entries is contained\n\ 372d29b2c44Sab in the sh_info field of the section header at index 0.\n\ 373d29b2c44Sab \n\ 374d29b2c44Sab If ehdr:e_phnum is called without an argument, the number\n\ 375d29b2c44Sab of program headers is shown. If called with the value argument,\n\ 376d29b2c44Sab the number is updated with the new value.\n\ 377d29b2c44Sab \n\ 378d29b2c44Sab Note: Changing e_phnum and/or the sh_link field of the first\n\ 379d29b2c44Sab section header does not change the size of the actual program\n\ 380d29b2c44Sab header array in the file.\n" 381d29b2c44Sab 382d29b2c44Sab 383d29b2c44Sab@ MSG_HELP_E_SHENTSIZE " \ 384d29b2c44Sab Examine or modify the size of one entry in the file's section\n\ 385d29b2c44Sab header table. This information is found in the e_shentsize\n\ 386d29b2c44Sab field of the ELF header.\n\ 387d29b2c44Sab \n\ 388d29b2c44Sab If ehdr:e_shentsize is called without an argument, the value of\n\ 389d29b2c44Sab e_shentsize is shown. If called with the value argument, the\n\ 390d29b2c44Sab e_shentsize field is updated with the new value.\n\ 391d29b2c44Sab \n\ 392d29b2c44Sab Note: Changing the e_shentsize field of the ELF header does\n\ 393d29b2c44Sab not change the size of the actual section header array elements.\n\ 394d29b2c44Sab Setting it to a different value is likely to produce an unusable\n\ 395d29b2c44Sab ELF object.\n" 396d29b2c44Sab 397d29b2c44Sab 398d29b2c44Sab@ MSG_HELP_E_SHNUM " \ 399d29b2c44Sab Examine or modify the number of entries in the section header\n\ 400d29b2c44Sab table. This information is found in the e_shnum field of the\n\ 401d29b2c44Sab ELF header, or in the sh_size field of the first section header\n\ 402d29b2c44Sab in the case of extended section indexes.\n\ 403d29b2c44Sab \n\ 404d29b2c44Sab If the number of sections is greater than or equal to\n\ 405d29b2c44Sab SHN_LORESERVE (0xff00), e_shnum has the value zero, and\n\ 406d29b2c44Sab the actual number of section header table entries is\n\ 407d29b2c44Sab contained in the sh_size field of the section header\n\ 408d29b2c44Sab at index 0.\n\ 409d29b2c44Sab \n\ 410d29b2c44Sab If ehdr:e_shnum is called without an argument, the number of\n\ 411d29b2c44Sab sections is shown. If called with the value argument, the\n\ 412d29b2c44Sab number of sections is updated with the new value.\n\ 413d29b2c44Sab \n\ 414d29b2c44Sab Note: Changing e_shnum and/or the sh_size field of the first\n\ 415d29b2c44Sab section header does not change the size of the actual section\n\ 416d29b2c44Sab header array in the file.\n" 417d29b2c44Sab 418d29b2c44Sab 419d29b2c44Sab@ MSG_HELP_E_SHSTRNDX " \ 420d29b2c44Sab Examine or modify the section table index of the entry that is\n\ 421d29b2c44Sab associated with the section name string table. This information\n\ 422d29b2c44Sab is found in the e_shstrndx field of the ELF header, or in the\n\ 423d29b2c44Sab sh_link field of the first section header in the case of\n\ 424d29b2c44Sab extended section indexes. If the file has no section name\n\ 425d29b2c44Sab string table, this member holds the value SHN_UNDEF.\n\ 426d29b2c44Sab \n\ 427d29b2c44Sab If the section name string table section index is greater\n\ 428d29b2c44Sab than or equal to SHN_LORESERVE (0xff00), e_shstrndx has the\n\ 429d29b2c44Sab value SHN_XINDEX (0xffff) and the actual index of the section\n\ 430d29b2c44Sab name string table section is contained in the sh_link field of\n\ 431d29b2c44Sab the section header at index 0.\n\ 432d29b2c44Sab \n\ 433d29b2c44Sab If ehdr:e_shstrndx is called without an argument, the index of\n\ 434d29b2c44Sab the section name string table is shown. If called with the value\n\ 435d29b2c44Sab argument, the ELF header is updated with the new value.\n\ 436d29b2c44Sab \n\ 437d29b2c44Sab Note: The e_shstrndx field of the ELF header must reference\n\ 438d29b2c44Sab a string table section. Otherwise, diagnostic tools will be\n\ 439d29b2c44Sab confused by the resulting object.\n" 440d29b2c44Sab 441d29b2c44Sab 442d29b2c44Sab@ MSG_HELP_EI_MAG0 " \ 443d29b2c44Sab Examine or modify the first byte of the object's \"magic number\".\n\ 444d29b2c44Sab The magic number is the first 4 bytes of the object file, and is\n\ 445d29b2c44Sab used to identify it as being an ELF object. This information\n\ 446d29b2c44Sab is found in the e_ident[EI_MAG0] field of the ELF header.\n\ 447d29b2c44Sab \n\ 448d29b2c44Sab If ehdr:ei_mag0 is called without an argument, the value of\n\ 449d29b2c44Sab e_ident[EI_MAG0] is shown. If called with the value argument,\n\ 450d29b2c44Sab the e_ident[EI_MAG0] field is updated with the new value.\n\ 451d29b2c44Sab \n\ 452d29b2c44Sab Note: Changing the e_ident[EI_MAG0] field of the ELF header\n\ 453d29b2c44Sab to a value other than 0x7f will cause the system to fail to\n\ 454d29b2c44Sab identify it as an ELF object.\n" 455d29b2c44Sab 456d29b2c44Sab 457d29b2c44Sab@ MSG_HELP_EI_MAG1 " \ 458d29b2c44Sab Examine or modify the second byte of the object's \"magic number\".\n\ 459d29b2c44Sab The magic number is the first 4 bytes of the object file, and is\n\ 460d29b2c44Sab used to identify it as being an ELF object. This information\n\ 461d29b2c44Sab is found in the e_ident[EI_MAG1] field of the ELF header.\n\ 462d29b2c44Sab \n\ 463d29b2c44Sab If ehdr:ei_mag1 is called without an argument, the value of\n\ 464d29b2c44Sab e_ident[EI_MAG1] is shown. If called with the value argument,\n\ 465d29b2c44Sab the e_ident[EI_MAG1] field is updated with the new value.\n\ 466d29b2c44Sab \n\ 467d29b2c44Sab Note: Changing the e_ident[EI_MAG1] field of the ELF header\n\ 468d29b2c44Sab to a value other than 0x45 ('E') will cause the system to\n\ 469d29b2c44Sab fail to identify it as an ELF object.\n" 470d29b2c44Sab 471d29b2c44Sab 472d29b2c44Sab@ MSG_HELP_EI_MAG2 " \ 473d29b2c44Sab Examine or modify the third byte of the object's \"magic number\".\n\ 474d29b2c44Sab The magic number is the first 4 bytes of the object file, and is\n\ 475d29b2c44Sab used to identify it as being an ELF object. This information\n\ 476d29b2c44Sab is found in the e_ident[EI_MAG2] field of the ELF header.\n\ 477d29b2c44Sab \n\ 478d29b2c44Sab If ehdr:ei_mag2 is called without an argument, the value of\n\ 479d29b2c44Sab e_ident[EI_MAG2] is shown. If called with the value argument,\n\ 480d29b2c44Sab the e_ident[EI_MAG2] field is updated with the new value.\n\ 481d29b2c44Sab \n\ 482d29b2c44Sab Note: Changing the e_ident[EI_MAG2] field of the ELF header\n\ 483d29b2c44Sab to a value other than 0x4c ('L') will cause the system to\n\ 484d29b2c44Sab fail to identify it as an ELF object.\n" 485d29b2c44Sab 486d29b2c44Sab 487d29b2c44Sab@ MSG_HELP_EI_MAG3 " \ 488d29b2c44Sab Examine or modify the fourth byte of the object's \"magic number\".\n\ 489d29b2c44Sab The magic number is the first 4 bytes of the object file, and is\n\ 490d29b2c44Sab used to identify it as being an ELF object. This information\n\ 491d29b2c44Sab is found in the e_ident[EI_MAG3] field of the ELF header.\n\ 492d29b2c44Sab \n\ 493d29b2c44Sab If ehdr:ei_mag3 is called without an argument, the value of\n\ 494d29b2c44Sab e_ident[EI_MAG3] is shown. If called with the value argument,\n\ 495d29b2c44Sab e_ident[EI_MAG3] field is updated with the new value.\n\ 496d29b2c44Sab \n\ 497d29b2c44Sab Note: Changing the e_ident[EI_MAG3] field of the ELF header\n\ 498d29b2c44Sab to a value other than 0x46 ('F') will cause the system to\n\ 499d29b2c44Sab fail to identify it as an ELF object.\n" 500d29b2c44Sab 501d29b2c44Sab 502d29b2c44Sab@ MSG_HELP_EI_CLASS " \ 503d29b2c44Sab Examine or modify the file's class (system word size). This\n\ 504d29b2c44Sab information is found in the e_ident[EI_CLASS] field of the\n\ 505d29b2c44Sab ELF header.\n\ 506d29b2c44Sab \n\ 507d29b2c44Sab If ehdr:ei_class is called without an argument, the value of\n\ 508d29b2c44Sab e_ident[EI_CLASS] is shown. If called with the value argument,\n\ 509d29b2c44Sab the e_ident[EI_CLASS] field is updated with the new value.\n\ 510d29b2c44Sab \n\ 511d29b2c44Sab Note: Changing the e_ident[EI_CLASS] field of the ELF header\n\ 512d29b2c44Sab does not alter the contents of the file, and is therefore\n\ 513d29b2c44Sab likely to render the file unusable.\n" 514d29b2c44Sab 515d29b2c44Sab@ MSG_HELP_EI_DATA " \ 516d29b2c44Sab Examine or modify the file's data encoding (byte order). This\n\ 517d29b2c44Sab information is found in the e_ident[EI_DATA] field of the\n\ 518d29b2c44Sab ELF header.\n\ 519d29b2c44Sab \n\ 520d29b2c44Sab If ehdr:ei_data is called without an argument, the value of\n\ 521d29b2c44Sab e_ident[EI_DATA] is shown. If called with the value argument,\n\ 522d29b2c44Sab the e_ident[EI_DATA] field is updated with the new value.\n\ 523d29b2c44Sab \n\ 524d29b2c44Sab Note: Changing the e_ident[EI_DATA] field of the ELF header\n\ 525d29b2c44Sab does not alter the contents of the file or the byte order\n\ 526d29b2c44Sab of the data, and is therefore likely to render the file unusable.\n" 527d29b2c44Sab 528d29b2c44Sab 529d29b2c44Sab@ MSG_HELP_EI_VERSION " \ 530d29b2c44Sab Examine or modify the object file version. This information\n\ 531d29b2c44Sab is found in the e_ident[EI_VERSION] field of the ELF header.\n\ 532d29b2c44Sab \n\ 533d29b2c44Sab If ehdr:ei_version is called without an argument, the value\n\ 534d29b2c44Sab of e_ident[EI_VERSION] is shown. If called with the value\n\ 535d29b2c44Sab argument, the e_ident[EI_VERSION] field is updated with the\n\ 536d29b2c44Sab new value.\n\ 537d29b2c44Sab \n\ 538d29b2c44Sab Note: The e_version element of the ELF header also contains\n\ 539d29b2c44Sab a version value. These two fields should be set to the same\n\ 540d29b2c44Sab value. Use the ehdr:e_version command to change that element.\n" 541d29b2c44Sab 542d29b2c44Sab 543d29b2c44Sab@ MSG_HELP_EI_OSABI " \ 544d29b2c44Sab Examine or modify the operating system / ABI identification for\n\ 545d29b2c44Sab the object. This information is kept in the e_ident[EI_OSABI]\n\ 546d29b2c44Sab field of the ELF header.\n\ 547d29b2c44Sab \n\ 548d29b2c44Sab If ehdr:ei_osabi is called without arguments, current value of\n\ 549d29b2c44Sab e_ident[EI_OSABI] is shown. If called with the value argument,\n\ 550d29b2c44Sab the e_ident[EI_OSABI] field is updated with the new value.\n\ 551d29b2c44Sab \n\ 552d29b2c44Sab Note: Changing the e_ident[EI_OSABI] field of the ELF header\n\ 553d29b2c44Sab does not alter the contents of the file, or cause the actual\n\ 554d29b2c44Sab ABI to be altered. Setting an incompatible ABI value is likely\n\ 555d29b2c44Sab to cause the object to become unusable.\n" 556d29b2c44Sab 557d29b2c44Sab 558d29b2c44Sab@ MSG_HELP_EI_ABIVERSION " \ 559d29b2c44Sab Examine or modify the ABI version for the object. This\n\ 560d29b2c44Sab information is kept in the e_ident[EI_ABIVERSION] field of\n\ 561d29b2c44Sab the ELF header.\n\ 562d29b2c44Sab \n\ 563d29b2c44Sab If ehdr:ei_abiversion is called without arguments, the current\n\ 564d29b2c44Sab value of e_ident[EI_ABIVERSION] is shown. If called with the\n\ 565d29b2c44Sab value argument, the e_ident[EI_ABIVERSION] field is updated with\n\ 566d29b2c44Sab the new value.\n\ 567d29b2c44Sab \n\ 568d29b2c44Sab Note: The meaning of the e_ident[EI_ABIVERSION] field of\n\ 569d29b2c44Sab the ELF header depends on the value of e_ident[EI_OSABI]\n\ 570d29b2c44Sab (See ehdr:ei_osabi).\n" 571d29b2c44Sab 572d29b2c44Sab 573d29b2c44Sab@ _END_ 574d29b2c44Sab 575d29b2c44Sab 576d29b2c44Sab 577d29b2c44Sab# Strings 578d29b2c44Sab 579d29b2c44Sab@ MSG_STR_EMPTY "" 580d29b2c44Sab@ MSG_STR_NL "\n" 581d29b2c44Sab@ MSG_STR_VALUE "value" 582d29b2c44Sab@ MSG_STR_EIDENT_HDR "e_ident:\n" 583d29b2c44Sab@ MSG_STR_INDEX "index" 584d29b2c44Sab@ MSG_STR_SEC "sec" 585d29b2c44Sab@ MSG_STR_TYPE "type" 586d29b2c44Sab@ MSG_STR_VERSION "version" 587d29b2c44Sab@ MSG_STR_OFFSET "offset" 588d29b2c44Sab@ MSG_STR_FLAGVALUE "flag_value" 589d29b2c44Sab@ MSG_STR_MINUS_SHNDX "-shndx" 590d29b2c44Sab@ MSG_STR_MINUS_SHTYP "-shtyp" 591d29b2c44Sab@ MSG_STR_SH_INFO "sh_info" 592d29b2c44Sab@ MSG_STR_SH_LINK "sh_link" 593d29b2c44Sab@ MSG_STR_SH_SIZE "sh_size" 594d29b2c44Sab 595d29b2c44Sab 596d29b2c44Sab# Format strings 597d29b2c44Sab@ MSG_FMT_BKTSTR "[%s]" 598d29b2c44Sab@ MSG_FMT_BKTINT "[%d]" 599d29b2c44Sab@ MSG_FMT_STRNL "%s\n" 600d29b2c44Sab@ MSG_FMT_DECNUMNL "%d\n" 601d29b2c44Sab@ MSG_FMT_HEXNUM "%#x" 602d29b2c44Sab@ MSG_FMT_HEXNUMNL "%#x\n" 603d29b2c44Sab@ MSG_FMT_HEXNUM_QCHR "%#x ('%c')" 604d29b2c44Sab@ MSG_FMT_EI_ELT " %-18s%s\n" 605d29b2c44Sab 606d29b2c44Sab 607d29b2c44Sab 608d29b2c44Sab 609d29b2c44Sab# The following strings represent reserved words, files, pathnames and symbols. 610d29b2c44Sab# Reference to this strings is via the MSG_ORIG() macro, and thus no message 611d29b2c44Sab# translation is required. 612d29b2c44Sab 613d29b2c44Sab 614d29b2c44Sab# Module name 615d29b2c44Sab 616d29b2c44Sab@ MSG_MOD_NAME "ehdr" 617d29b2c44Sab 618d29b2c44Sab 619d29b2c44Sab# Command names 620d29b2c44Sab 621d29b2c44Sab@ MSG_CMD_DUMP "dump" 622d29b2c44Sab 623d29b2c44Sab@ MSG_CMD_E_IDENT "e_ident" 624d29b2c44Sab@ MSG_CMD_E_TYPE "e_type" 625d29b2c44Sab@ MSG_CMD_E_MACHINE "e_machine" 626d29b2c44Sab@ MSG_CMD_E_VERSION "e_version" 627d29b2c44Sab@ MSG_CMD_E_ENTRY "e_entry" 628d29b2c44Sab@ MSG_CMD_E_PHOFF "e_phoff" 629d29b2c44Sab@ MSG_CMD_E_SHOFF "e_shoff" 630d29b2c44Sab@ MSG_CMD_E_FLAGS "e_flags" 631d29b2c44Sab@ MSG_CMD_E_EHSIZE "e_ehsize" 632d29b2c44Sab@ MSG_CMD_E_PHENTSIZE "e_phentsize" 633d29b2c44Sab@ MSG_CMD_E_PHNUM "e_phnum" 634d29b2c44Sab@ MSG_CMD_E_SHENTSIZE "e_shentsize" 635d29b2c44Sab@ MSG_CMD_E_SHNUM "e_shnum" 636d29b2c44Sab@ MSG_CMD_E_SHSTRNDX "e_shstrndx" 637d29b2c44Sab 638d29b2c44Sab@ MSG_CMD_EI_MAG0 "ei_mag0" 639d29b2c44Sab@ MSG_CMD_EI_MAG1 "ei_mag1" 640d29b2c44Sab@ MSG_CMD_EI_MAG2 "ei_mag2" 641d29b2c44Sab@ MSG_CMD_EI_MAG3 "ei_mag3" 642d29b2c44Sab@ MSG_CMD_EI_CLASS "ei_class" 643d29b2c44Sab@ MSG_CMD_EI_DATA "ei_data" 644d29b2c44Sab@ MSG_CMD_EI_VERSION "ei_version" 645d29b2c44Sab@ MSG_CMD_EI_OSABI "ei_osabi" 646d29b2c44Sab@ MSG_CMD_EI_ABIVERSION "ei_abiversion" 647