xref: /onnv-gate/usr/src/cmd/sgs/elfedit/modules/common/shdr.msg (revision 5892:b863dde33f1b)
15088Sab196087#
25088Sab196087# CDDL HEADER START
35088Sab196087#
45088Sab196087# The contents of this file are subject to the terms of the
55088Sab196087# Common Development and Distribution License (the "License").
65088Sab196087# You may not use this file except in compliance with the License.
75088Sab196087#
85088Sab196087# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
95088Sab196087# or http://www.opensolaris.org/os/licensing.
105088Sab196087# See the License for the specific language governing permissions
115088Sab196087# and limitations under the License.
125088Sab196087#
135088Sab196087# When distributing Covered Code, include this CDDL HEADER in each
145088Sab196087# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
155088Sab196087# If applicable, add the following below this CDDL HEADER, with the
165088Sab196087# fields enclosed by brackets "[]" replaced with your own identifying
175088Sab196087# information: Portions Copyright [yyyy] [name of copyright owner]
185088Sab196087#
195088Sab196087# CDDL HEADER END
205088Sab196087#
215088Sab196087
225088Sab196087#
23*5892Sab196087# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
245088Sab196087# Use is subject to license terms.
255088Sab196087#
265088Sab196087# ident	"%Z%%M%	%I%	%E% SMI"
275088Sab196087
285088Sab196087@ _START_
295088Sab196087
305088Sab196087# Message file for elfedit 'shdr' module
315088Sab196087
325088Sab196087@ MSG_ID_ELFEDIT_SHDR
335088Sab196087
345088Sab196087
355088Sab196087# Section header format
365088Sab196087@ MSG_ELF_SHDR		"Section Header[%d]:  sh_name: %s\n"
375088Sab196087
385088Sab196087# Debug messages
395088Sab196087
405088Sab196087@ MSG_DEBUG_S_OK	"shdr[%d: %s].%s: value unchanged: %s\n"
415088Sab196087@ MSG_DEBUG_S_CHG	"shdr[%d: %s].%s: change from %s to %s\n"
425088Sab196087@ MSG_DEBUG_LLX_OK	"shdr[%d: %s].%s: value unchanged: %#llx\n"
435088Sab196087@ MSG_DEBUG_LLX_CHG	"shdr[%d: %s].%s: change from %#llx to %#llx\n"
445088Sab196087@ MSG_DEBUG_D_OK	"shdr[%d: %s].%s: value unchanged: %d\n"
455088Sab196087@ MSG_DEBUG_D_CHG	"shdr[%d: %s].%s: change from %d to %d\n"
465088Sab196087@ MSG_DEBUG_CHGSHDR0	"ELF warning: Unexpected direct change to \
475088Sab196087			 section header [0]: Header [0] is used for \
485088Sab196087			 extended section and program headers by the ehdr \
495088Sab196087			 module, and should otherwise be completely zero\n"
505088Sab196087@ MSG_DEBUG_ADDRALIGN	"ELF warning: sh_addralign value is expected to \
515088Sab196087			 be 0, 1, or a power of 2: %s\n"
525088Sab196087
535088Sab196087
545088Sab196087# Module description
555088Sab196087
565088Sab196087@ MSG_MOD_DESC		"Section Header Array"
575088Sab196087
585088Sab196087
595088Sab196087# 1-line description strings
605088Sab196087
615088Sab196087@ MSG_DESC_DUMP		"Dump Section Headers"
625088Sab196087
635088Sab196087@ MSG_DESC_SH_ADDR	"Section memory address"
645088Sab196087@ MSG_DESC_SH_ADDRALIGN	"Section address alignment"
655088Sab196087@ MSG_DESC_SH_ENTSIZE	"Section per-item size"
665088Sab196087@ MSG_DESC_SH_FLAGS	"Section flags"
675088Sab196087@ MSG_DESC_SH_INFO	"Section info"
685088Sab196087@ MSG_DESC_SH_LINK	"Section link"
695088Sab196087@ MSG_DESC_SH_NAME	"Section name"
705088Sab196087@ MSG_DESC_SH_OFFSET	"Section file offset"
715088Sab196087@ MSG_DESC_SH_SIZE	"Section size (bytes)"
725088Sab196087@ MSG_DESC_SH_TYPE	"Section type"
735088Sab196087
745088Sab196087
755088Sab196087# Command option description strings
765088Sab196087
775088Sab196087@ MSG_OPTDESC_SHNDX	"\
785088Sab196087   Interpret the sec argument as a section index rather than\n\
795088Sab196087   as a section name. section can be one of the well known SHN_\n\
805088Sab196087   symbolic constants, or any integer.\n"
815088Sab196087
825088Sab196087@ MSG_OPTDESC_SHTYP	"\
835088Sab196087   Interpret the sec argument as a section type rather than\n\
845088Sab196087   as a section name. section can be one of the well known SHT_\n\
855088Sab196087   symbolic constants, or any integer.\n"
865088Sab196087
875088Sab196087@ MSG_OPTDESC_NAME_OFFSET	"\
885088Sab196087   Interpret the name argument as a string table offset rather\n\
895088Sab196087   than as a string.\n"
905088Sab196087
91*5892Sab196087@ MSG_OPTDESC_VALUE_SHNAM	"\
92*5892Sab196087   Interpret the value argument as a section name rather than\n\
93*5892Sab196087   as an integer. The index of the first section with the\n\
94*5892Sab196087   specified name will be used as the value.\n"
95*5892Sab196087
96*5892Sab196087@ MSG_OPTDESC_VALUE_SHTYP	"\
97*5892Sab196087   Interpret the value argument as a section type rather than\n\
98*5892Sab196087   as an integer. The index of the first section of the specified\n\
99*5892Sab196087   type will be used as the value. value can be one of the well\n\
100*5892Sab196087   known SHT_ symbolic constants, or any integer.\n"
101*5892Sab196087
1025088Sab196087
1035088Sab196087# Command argument descriptions
1045088Sab196087
1055088Sab196087@ MSG_A1_SEC	"\
1065088Sab196087   Section to examine or modify. By default, this argument is\n\
1075088Sab196087   interpreted as the name of the desired section. The section\n\
1085088Sab196087   index of the first section with the specified name is used.\n\
1095088Sab196087   \n\
1105088Sab196087   If -shndx is set, then sec is a section index, and is\n\
1115088Sab196087   interpreted as an integer, or one of the well known SHN_\n\
1125088Sab196087   symbolic constant names.\n\
1135088Sab196087   \n\
1145088Sab196087   If -shtyp is set, then sec is a section type, and is\n\
1155088Sab196087   interpreted as an integer, or one of the well known SHT_\n\
1165088Sab196087   symbolic constant names. The section index of the first\n\
1175088Sab196087   section with the specified type is used.\n"
1185088Sab196087
1195088Sab196087@ MSG_A2_DESC_SH_ADDR	"Integer value to set for section address.\n"
1205088Sab196087
1215088Sab196087@ MSG_A2_DESC_SH_ADDRALIGN "\
1225088Sab196087   Integer value to set for section alignment.\n"
1235088Sab196087
1245088Sab196087@ MSG_A2_DESC_SH_ENTSIZE "\
1255088Sab196087   Integer value to set for size of an individual element in\n\
1265088Sab196087   a section of fixed-size entries.\n"
1275088Sab196087
1285088Sab196087@ MSG_A2_DESC_SH_FLAGS "\
1295088Sab196087   Section flags. SHF_ flag constants are accepted, as is\n\
1305088Sab196087   any integer.\n"
1315088Sab196087
1325088Sab196087@ MSG_A2_DESC_SH_INFO	"\
1335088Sab196087   Integer value to set for symbol sh_info field. The meaning\n\
1345088Sab196087   of this value depends on the type of the section.\n"
1355088Sab196087
1365088Sab196087@ MSG_A2_DESC_SH_LINK	"\
1375088Sab196087   Integer value to set for symbol sh_link field. The meaning\n\
1385088Sab196087   of this value depends on the type of the section.\n"
1395088Sab196087
1405088Sab196087@ MSG_A2_DESC_SH_NAME	"\
1415088Sab196087   Name to set for section. If the -name_offset option is\n\
1425088Sab196087   used, this is an integer offset into the section header\n\
1435088Sab196087   string table. Otherwise, it is a string, which will be\n\
1445088Sab196087   looked up in the symbol table in order to obtain the needed\n\
1455088Sab196087    offset value.\n"
1465088Sab196087
1475088Sab196087@ MSG_A2_DESC_SH_OFFSET	"\
1485088Sab196087   Integer value to set for symbol sh_offset field. The value\n\
1495088Sab196087   of sh_offset gives the byte offset from the beginning of\n\
1505088Sab196087   the file to the first byte in the section. For SHT_NOBITS\n\
1515088Sab196087   sections, this member indicates the conceptual offset in the\n\
1525088Sab196087   file, as the section occupies no space in the file.\n"
1535088Sab196087
1545088Sab196087@ MSG_A2_DESC_SH_SIZE	"\
1555088Sab196087   Integer value to set for size of section, in bytes. Unless the\n\
1565088Sab196087   section type is SHT_NOBITS, the section occupies sh_size bytes\n\
1575088Sab196087   in the file. A section of type SHT_NOBITS can have a nonzero\n\
1585088Sab196087   size, but the section occupies no space in the file.\n"
1595088Sab196087
1605088Sab196087@ MSG_A2_DESC_SH_TYPE	"\
1615088Sab196087   Value to set for section type. The value can be an integer,\n\
1625088Sab196087   or one of the well known SHT_ symbolic constant names.\n"
1635088Sab196087
1645088Sab196087
1655088Sab196087
1665088Sab196087# Help strings
1675088Sab196087
1685088Sab196087@ MSG_HELP_DUMP	"   \
1695088Sab196087   The shdr:dump command is used to display section header\n\
1705088Sab196087    information using the same style used by the elfdump program.\n\
1715088Sab196087   \n\
1725088Sab196087   If shdr:dump is called without arguments, information for every\n\
1735088Sab196087   section header in the object is shown. If called with the shndx\n\
1745088Sab196087   argument, the section header at that index is displayed.\n"
1755088Sab196087
1765088Sab196087@ MSG_HELP_SH_ADDR	"   \
1775088Sab196087   The shdr:sh_addr command is used to display or alter the\n\
1785088Sab196087   starting virtual memory address of the section.\n\
1795088Sab196087   \n\
1805088Sab196087   If the section appears in the memory image of a process,\n\
1815088Sab196087   this member gives the address at which the sections's\n\
1825088Sab196087   first byte should reside. Otherwise, the member is expected\n\
1835088Sab196087   to contain the value zero.\n\
1845088Sab196087   \n\
1855088Sab196087   If shdr:sh_addr is called without arguments, the value of\n\
1865088Sab196087   sh_addr for every section in the section header array is\n\
1875088Sab196087   shown. If called with the shndx argument, the value of the\n\
1885088Sab196087   section at that index is displayed. If both arguments are\n\
1895088Sab196087   present, the sh_addr field of the section at the specified\n\
1905088Sab196087   index is set to the given value.\n"
1915088Sab196087
1925088Sab196087@ MSG_HELP_SH_ADDRALIGN	"   \
1935088Sab196087   The shdr:sh_addralign command is used to display or alter the\n\
1945088Sab196087   alignment constraint for the section.\n\
1955088Sab196087   \n\
1965088Sab196087   Some sections have address alignment constraints. For example,\n\
1975088Sab196087   if a section holds a double-word, the system must ensure\n\
1985088Sab196087   double-word alignment for the entire section. In this case,\n\
1995088Sab196087   the value of sh_addr must be congruent to 0, modulo the value\n\
2005088Sab196087   of sh_addralign. Currently, only 0 and positive integral\n\
2015088Sab196087   powers of 2 are used in Solaris ELF files. Values 0 and 1\n\
2025088Sab196087   mean the section has no alignment constraints.\n\
2035088Sab196087   \n\
2045088Sab196087   If shdr:sh_addralign is called without arguments, the value\n\
2055088Sab196087   of sh_addralign for every section in the section header array\n\
2065088Sab196087   is shown. If called with the shndx argument, the value of the\n\
2075088Sab196087   section at that index is displayed. If both arguments are\n\
2085088Sab196087   present, the sh_addralign field of the section at the specified\n\
2095088Sab196087   index is set to the given value.\n"
2105088Sab196087
2115088Sab196087@ MSG_HELP_SH_ENTSIZE	"   \
2125088Sab196087   The shdr:sh_entsize command is used to display or alter the\n\
2135088Sab196087   per-item entry size for the section.\n\
2145088Sab196087   \n\
2155088Sab196087   Some sections hold a table of fixed-size entries, such as a\n\
2165088Sab196087   symbol table. For such a section, this member gives the size\n\
2175088Sab196087   in bytes of each entry. By convention, the member is set to\n\
2185088Sab196087   the value zero if the section does not hold a table of\n\
2195088Sab196087   fixed-size entries.\n\
2205088Sab196087   \n\
2215088Sab196087   If shdr:sh_entsize is called without arguments, the value\n\
2225088Sab196087   of sh_entsize for every section in the section header array\n\
2235088Sab196087   is shown. If called with the shndx argument, the value of the\n\
2245088Sab196087   section at that index is displayed. If both arguments are\n\
2255088Sab196087   present, the sh_entsize field of the section at the specified\n\
2265088Sab196087   index is set to the given value.\n"
2275088Sab196087
2285088Sab196087@ MSG_HELP_SH_FLAGS	"   \
2295088Sab196087   The shdr:sh_flags command is used to display or alter the\n\
2305088Sab196087   flags that are associated with the section.\n\
2315088Sab196087   \n\
2325088Sab196087   \n\
2335088Sab196087   If shdr:sh_flags is called without arguments, the value\n\
2345088Sab196087   of sh_flags for every section in the section header array\n\
2355088Sab196087   is shown. If called with the shndx argument, the value of\n\
2365088Sab196087   the section at that index is displayed. If one or more\n\
2375088Sab196087   value arguments are present, the following steps are taken:\n\
2385088Sab196087   \n   \
2395088Sab196087   o\tAll the value arguments are OR'd together.\n\
2405088Sab196087   \n   \
2415088Sab196087   o\tIf the -cmp option has been specified, the new value\n\
2425088Sab196087   \tis complemented.\n\
2435088Sab196087   \n   \
2445088Sab196087   o\tThe sh_flags field of the section header is updated with\n\
2455088Sab196087   \tthe new value. If -and is specified, the new value is\n\
2465088Sab196087   \tAND'd against the existing value. If -or is specified,\n\
2475088Sab196087   \tthe new value is OR'd against the existing value. If\n\
2485088Sab196087   \tneither -and or -or are specified, the new value replaces\n\
2495088Sab196087   \tthe existing value.\n"
2505088Sab196087
2515088Sab196087@ MSG_HELP_SH_INFO	"   \
2525088Sab196087   The shdr:sh_info command is used to display or alter the\n\
2535088Sab196087   sh_info field of the specified section.\n\
2545088Sab196087   \n\
2555088Sab196087   sh_info contains extra information, the interpretation\n\
2565088Sab196087   of which depends on the section type.\n\
2575088Sab196087   \n\
2585088Sab196087   If shdr:sh_info is called without arguments, the value\n\
2595088Sab196087   of sh_info for every section in the section header array\n\
2605088Sab196087   is shown. If called with the shndx argument, the value of the\n\
2615088Sab196087   section at that index is displayed. If both arguments are\n\
2625088Sab196087   present, the sh_info field of the section at the specified\n\
2635088Sab196087   index is set to the given value.\n"
2645088Sab196087
2655088Sab196087@ MSG_HELP_SH_LINK	"   \
2665088Sab196087   The shdr:sh_link command is used to display or alter the\n\
2675088Sab196087   sh_link field of the specified section.\n\
2685088Sab196087   \n\
2695088Sab196087   sh_link contains extra information, the interpretation\n\
2705088Sab196087   of which depends on the section type.\n\
2715088Sab196087   \n\
2725088Sab196087   If shdr:sh_link is called without arguments, the value\n\
2735088Sab196087   of sh_link for every section in the section header array\n\
2745088Sab196087   is shown. If called with the shndx argument, the value of the\n\
2755088Sab196087   section at that index is displayed. If both arguments are\n\
2765088Sab196087   present, the sh_link field of the section at the specified\n\
2775088Sab196087   index is set to the given value.\n"
2785088Sab196087
2795088Sab196087@ MSG_HELP_SH_NAME	"   \
2805088Sab196087   The shdr:sh_name command is used to display or alter the\n\
2815088Sab196087   name associated with a specified section.\n\
2825088Sab196087   \n\
2835088Sab196087   The sh_name field of a section header is an index into\n\
2845088Sab196087   the section header string table section giving the location\n\
2855088Sab196087   of a null terminated string.\n\
2865088Sab196087   \n\
2875088Sab196087   If shdr:sh_name is called without arguments, the name of\n\
2885088Sab196087   every section in the section header array is shown. If called\n\
2895088Sab196087   with the shndx argument, the name of the section at that\n\
2905088Sab196087   index is displayed. If both arguments are present, the\n\
2915088Sab196087   sh_name field of the section at the specified index is set\n\
2925088Sab196087   to the given value.\n\
2935088Sab196087   \n\
2945088Sab196087   When changing the name of a section, you should be aware\n\
2955088Sab196087   that the name selected must exist within the section header\n\
2965088Sab196087   string table, as it is not possible to add new strings to\n\
2975088Sab196087   this string table.\n"
2985088Sab196087
2995088Sab196087@ MSG_HELP_SH_OFFSET	"   \
3005088Sab196087   The shdr:sh_offset command is used to display or alter the\n\
3015088Sab196087   sh_offset field of the specified section.\n\
3025088Sab196087   \n\
3035088Sab196087   sh_offset provides the byte offset from the beginning of\n\
3045088Sab196087   the file to the first byte in the section. For a SHT_NOBITS\n\
3055088Sab196087   section, this member indicates the conceptual offset in\n\
3065088Sab196087   the file, as the section occupies no space in the file.\n\
3075088Sab196087   \n\
3085088Sab196087   If shdr:sh_offset is called without arguments, the value\n\
3095088Sab196087   of sh_offset for every section in the section header array\n\
3105088Sab196087   is shown. If called with the shndx argument, the value of the\n\
3115088Sab196087   section at that index is displayed. If both arguments are\n\
3125088Sab196087   present, the sh_offset field of the section at the specified\n\
3135088Sab196087   index is set to the given value.\n"
3145088Sab196087
3155088Sab196087@ MSG_HELP_SH_SIZE	"   \
3165088Sab196087   The shdr:sh_size command is used to display or alter the\n\
3175088Sab196087   sh_size field of the specified section.\n\
3185088Sab196087   \n\
3195088Sab196087   sh_size provides the section's size in bytes. Unless the\n\
3205088Sab196087   section type is SHT_NOBITS, the section occupies sh_size\n\
3215088Sab196087   bytes in the file. A section of type SHT_NOBITS can have\n\
3225088Sab196087   a non-zero size, but the section occupies no space in the file.\n\
3235088Sab196087   \n\
3245088Sab196087   If shdr:sh_size is called without arguments, the value\n\
3255088Sab196087   of sh_size for every section in the section header array\n\
3265088Sab196087   is shown. If called with the shndx argument, the value of the\n\
3275088Sab196087   section at that index is displayed. If both arguments are\n\
3285088Sab196087   present, the sh_size field of the section at the specified\n\
3295088Sab196087   index is set to the given value.\n"
3305088Sab196087
3315088Sab196087@ MSG_HELP_SH_TYPE	"   \
3325088Sab196087   The shdr:sh_type command is used to display or alter the\n\
3335088Sab196087   sh_type field of the specified section.\n\
3345088Sab196087   \n\
3355088Sab196087   The type of a section categorizes the section's contents\n\
3365088Sab196087   and semantics.\n\
3375088Sab196087   \n\
3385088Sab196087   If shdr:sh_type is called without arguments, the value\n\
3395088Sab196087   of sh_type for every section in the section header array\n\
3405088Sab196087   is shown. If called with the shndx argument, the value of the\n\
3415088Sab196087   section at that index is displayed. If both arguments are\n\
3425088Sab196087   present, the sh_type field of the section at the specified\n\
3435088Sab196087   index is set to the given value.\n"
3445088Sab196087
3455088Sab196087
3465088Sab196087
3475088Sab196087@ _END_
3485088Sab196087
3495088Sab196087
3505088Sab196087# The following strings represent reserved words, files, pathnames and symbols.
3515088Sab196087# Reference to this strings is via the MSG_ORIG() macro, and thus no message
3525088Sab196087# translation is required.
3535088Sab196087
3545088Sab196087
3555088Sab196087# Miscellaneous clutter
3565088Sab196087@ MSG_STR_EMPTY			""
3575088Sab196087@ MSG_STR_NL			"\n"
3585088Sab196087@ MSG_STR_MINUS_SHNDX		"-shndx"
3595088Sab196087@ MSG_STR_MINUS_SHTYP		"-shtyp"
3605088Sab196087@ MSG_STR_MINUS_NAME_OFFSET	"-name_offset"
361*5892Sab196087@ MSG_STR_MINUS_VALUE_SHNAM	"-value_shnam"
362*5892Sab196087@ MSG_STR_MINUS_VALUE_SHTYP	"-value_shtyp"
3635088Sab196087@ MSG_STR_NAME			"name"
3645088Sab196087@ MSG_STR_SEC			"sec"
3655088Sab196087@ MSG_STR_VALUE			"value"
3665088Sab196087
3675088Sab196087
3685088Sab196087# Format strings
3695088Sab196087
3705088Sab196087@ MSG_FMT_WORDVALNL		"%u\n"
3715088Sab196087@ MSG_FMT_WORDHEXNL		"%#x\n"
3725088Sab196087@ MSG_FMT_XWORDHEXNL		"%#llx\n"
3735088Sab196087@ MSG_FMT_STRNL			"%s\n"
3745088Sab196087
3755088Sab196087
3765088Sab196087# Module name
3775088Sab196087
3785088Sab196087@ MSG_MOD_NAME		"shdr"
3795088Sab196087
3805088Sab196087
3815088Sab196087# Command names
3825088Sab196087
3835088Sab196087@ MSG_CMD_DUMP		"dump"
3845088Sab196087
3855088Sab196087@ MSG_CMD_SH_ADDR	"sh_addr"
3865088Sab196087@ MSG_CMD_SH_ADDRALIGN	"sh_addralign"
3875088Sab196087@ MSG_CMD_SH_ENTSIZE	"sh_entsize"
3885088Sab196087@ MSG_CMD_SH_FLAGS	"sh_flags"
3895088Sab196087@ MSG_CMD_SH_INFO	"sh_info"
3905088Sab196087@ MSG_CMD_SH_LINK	"sh_link"
3915088Sab196087@ MSG_CMD_SH_NAME	"sh_name"
3925088Sab196087@ MSG_CMD_SH_OFFSET	"sh_offset"
3935088Sab196087@ MSG_CMD_SH_SIZE	"sh_size"
3945088Sab196087@ MSG_CMD_SH_TYPE	"sh_type"
395