xref: /onnv-gate/usr/src/cmd/sgs/elfedit/modules/common/str.msg (revision 6225:e6305f16e938)
15308Sab196087#
25308Sab196087# CDDL HEADER START
35308Sab196087#
45308Sab196087# The contents of this file are subject to the terms of the
55308Sab196087# Common Development and Distribution License (the "License").
65308Sab196087# You may not use this file except in compliance with the License.
75308Sab196087#
85308Sab196087# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
95308Sab196087# or http://www.opensolaris.org/os/licensing.
105308Sab196087# See the License for the specific language governing permissions
115308Sab196087# and limitations under the License.
125308Sab196087#
135308Sab196087# When distributing Covered Code, include this CDDL HEADER in each
145308Sab196087# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
155308Sab196087# If applicable, add the following below this CDDL HEADER, with the
165308Sab196087# fields enclosed by brackets "[]" replaced with your own identifying
175308Sab196087# information: Portions Copyright [yyyy] [name of copyright owner]
185308Sab196087#
195308Sab196087# CDDL HEADER END
205308Sab196087#
215308Sab196087
225308Sab196087#
235892Sab196087# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
245308Sab196087# Use is subject to license terms.
255308Sab196087#
265308Sab196087# ident	"%Z%%M%	%I%	%E% SMI"
275308Sab196087
285308Sab196087@ _START_
295308Sab196087
305308Sab196087# Message file for elfedit 'str' module
315308Sab196087
325308Sab196087@ MSG_ID_ELFEDIT_STR
335308Sab196087
345308Sab196087
355308Sab196087# Format strings
365308Sab196087@ MSG_FMT_STRTAB	"String Table Section:  %s\n"
375308Sab196087@ MSG_FMT_DYNSTRPAD	"Dynamic String Table Padding \
385308Sab196087			 Region: [%d-%d] (%d bytes)\n"
395308Sab196087@ MSG_FMT_DUMPTITLE	"          index    value\n"
405308Sab196087
415308Sab196087# Debug messages
425308Sab196087
435308Sab196087@ MSG_DEBUG_S_OK	"[%d: %s][%d]: value unchanged: %s\n"
445308Sab196087@ MSG_DEBUG_S_CHG	"[%d: %s][%d]: change from %.*s to %s\n"
455308Sab196087@ MSG_DEBUG_Z_OK	"[%d: %s][%d]: value unchanged\n"
465308Sab196087@ MSG_DEBUG_Z_CHG	"[%d: %s][%d]: inserted %d NULL bytes\n"
475308Sab196087@ MSG_DEBUG_CHGSTR0	"[%d: %s][%d]: ELF warning: element [0] is expected \
485308Sab196087			 to contain a NULL (0) byte, and should not be \
495308Sab196087			 altered: %s\n"
505308Sab196087@ MSG_DEBUG_BADSTRPAD	"[%d: %s]: DT_SUNW_STRPAD value (%#llx) is larger \
515308Sab196087			 than string table section (%#llx), and will be \
525308Sab196087			 ignored\n"
535308Sab196087@ MSG_DEBUG_ADDDYNSTR	"[%d: %s][%d]: Using %d/%d bytes from reserved area \
545308Sab196087			 to add string: %s\n"
555308Sab196087@ MSG_DEBUG_LONGSTR	"[%d: %s][%d]: ELF warning: new string is longer \
565308Sab196087			 than previous value (%d > %d), and will overwrite \
575308Sab196087			 the beginning of the following item\n"
585308Sab196087
595308Sab196087# Errors
605308Sab196087
615308Sab196087@ MSG_ERR_STRNOTFND	"[%d: %s]: String table does not contain string: %s\n"
625308Sab196087@ MSG_ERR_NOFIT		"[%d: %s][%d]: New value would extend past end \
635308Sab196087			 of string table: %s\n"
645308Sab196087@ MSG_ERR_FINALNULL	"[%d: %s][%d]: New value would set final byte of \
655308Sab196087			 string table to non-NULL value: %s\n"
665308Sab196087
675308Sab196087
685308Sab196087
695308Sab196087# Module description
705308Sab196087
715308Sab196087@ MSG_MOD_DESC		"String Table Section"
725308Sab196087
735308Sab196087
745308Sab196087# 1-line description strings
755308Sab196087
765308Sab196087@ MSG_DESC_DUMP		"Dump String Table Section"
775308Sab196087@ MSG_DESC_SET		"Alter Existing String Table Contents"
785308Sab196087@ MSG_DESC_ADD		"Add New String to String Table"
795308Sab196087@ MSG_DESC_ZERO		"Zero String Table Region"
805308Sab196087
815308Sab196087
825308Sab196087# Command option description strings
835308Sab196087
845892Sab196087@ MSG_OPTDESC_ANY		"\
855892Sab196087   Normally, only string table sections (section type SHT_STRTAB)\n\
86*6225Sab196087   or sections with the SHF_STRINGS section flag set are allowed.\n\
87*6225Sab196087   If -any is set, then the specified section is used without\n\
88*6225Sab196087   checking its section type, and will be treated as if it is a\n\
89*6225Sab196087   string table. This can be used to examine sections that are\n\
90*6225Sab196087   known to be in string table format even though they are not\n\
91*6225Sab196087   properly marked as such (i.e. SHT_PROGBITS).\n"
925892Sab196087
935308Sab196087@ MSG_OPTDESC_END		"\
945308Sab196087   Zero to the end of the string table. The count argument\n\
955308Sab196087   cannot be used in conjunction with -end.\n".
965308Sab196087
975308Sab196087@ MSG_OPTDESC_NOTERM		"\
985308Sab196087   Do not write the null termination for the new string into\n\
995308Sab196087   the string table. This option cannot be used with the final\n\
1005308Sab196087   position in the string table. Attempts to do so will result\n\
1015308Sab196087   in an error.\n".
1025308Sab196087
1035308Sab196087@ MSG_OPTDESC_SHNAM		"\
1045308Sab196087   Use the string table found in the ELF section with the\n\
1055308Sab196087   specified name. If this is a string table section, it\n\
1065308Sab196087   is used directly. If it is a section that has an associated\n\
1075308Sab196087   symbol table or string table via its sh_link field, then the\n\
1085308Sab196087   associated string table is used.\n"
1095308Sab196087
1105308Sab196087@ MSG_OPTDESC_SHNDX		"\
1115308Sab196087   Use the string table found in the ELF section with the\n\
1125308Sab196087   specified index. If this is a string table section, it\n\
1135308Sab196087   is used directly. If it is a section that has an associated\n\
1145308Sab196087   symbol table or string table via its sh_link field, then the\n\
1155308Sab196087   associated string table is used.\n"
1165308Sab196087
1175308Sab196087@ MSG_OPTDESC_SHTYP		"\
1185308Sab196087   Locate the first section in the ELF object with the\n\
1195308Sab196087   given section type, and use the string table associated\n\
1205308Sab196087   with it. If this is a string table section, it is used\n\
1215308Sab196087   directly. If it is a section that has an associated\n\
1225308Sab196087   symbol table or string table via its sh_link field, then the\n\
1235308Sab196087   associated string table is used.\n"
1245308Sab196087
1255308Sab196087@ MSG_OPTDESC_STRNDX		"\
1265308Sab196087   The string argument supplies a numeric index into the\n\
1275308Sab196087   string table instead of the string value.\n".
1285308Sab196087
1295308Sab196087
1305308Sab196087# Command argument descriptions
1315308Sab196087
1325308Sab196087@ MSG_A1_STRING		"String to locate in string table section.\n"
1335308Sab196087
1345308Sab196087@ MSG_A1_NEWSTRING	"\
1355308Sab196087   New string to insert in string table section\n\
1365308Sab196087   if not already present.\n"
1375308Sab196087
1385308Sab196087@ MSG_A2_NEWSTRING	"\
1395308Sab196087   New string to overwrite previous value.\n"
1405308Sab196087
1415308Sab196087@ MSG_A2_COUNT	"\
1425308Sab196087   Number of null bytes to write at specified offset.\n"
1435308Sab196087
1445308Sab196087
1455308Sab196087
1465308Sab196087# Help strings
1475308Sab196087
1485308Sab196087@ MSG_HELP_DUMP	"   \
1495308Sab196087   The str:dump command is used to display information\n\
1505308Sab196087   from a string table section.\n\
1515308Sab196087   \n\
1525308Sab196087   By default, the string table referenced by the e_shstrndx field\n\
1535308Sab196087   of the ELF header is used. The -shnam, -shndx, or -shndx options\n\
1545308Sab196087   can be used to select a different string table.\n\
1555308Sab196087   \n\
1565308Sab196087   If str:dump is called without arguments, every string in the\n\
1575308Sab196087   string table is shown. If called with the string argument,\n\
1585892Sab196087   the information for that string is displayed.\n\
1595892Sab196087   \n\
1605892Sab196087   The strings are displayed within double quotes. These quotes are\n\
1615892Sab196087   not part of the actual string, and serve to visually delimit the\n\
1625892Sab196087   actual string. Printable characters are shown as themselves, while\n\
1635892Sab196087   non-printable characters are shown using the same notation used\n\
1645892Sab196087   by the C programming language for literal string constants:\n\
1655892Sab196087   \n\
1665892Sab196087   \t\\a\talert (bell)\n\
1675892Sab196087   \t\\b\tbackspace\n\
1685892Sab196087   \t\\f\tform feed\n\
1695892Sab196087   \t\\n\tnewline\n\
1705892Sab196087   \t\\r\treturn\n\
1715892Sab196087   \t\\t\thorizontal tab\n\
1725892Sab196087   \t\\v\tvertical tab\n\
1735892Sab196087   \t\\\\\tbackslash\n\
1745892Sab196087   \t\\'\tsingle quote\n\
1755892Sab196087   \t\\\"\tdouble quote\n\
1765892Sab196087   \t\\ooo\tAn octal constant, where ooo is one to three\n\
1775892Sab196087   \t\t\toctal digits (0..7)\n"
1785308Sab196087
1795308Sab196087@ MSG_HELP_SET	"   \
1805308Sab196087   The str:set command is used to display or alter the existing\n\
1815308Sab196087   contents of the string table section.\n\
1825308Sab196087   \n\
1835308Sab196087   By default, the string table referenced by the e_shstrndx field\n\
1845308Sab196087   of the ELF header is used. The -shnam, -shndx, or -shndx options\n\
1855308Sab196087   can be used to select a different string table.\n\
1865308Sab196087   \n\
1875308Sab196087   The string table offset is normally determined by looking\n\
1885308Sab196087   for the specified string in the table and using its offset.\n\
1895308Sab196087   Alternatively, the -strndx option can be used to specify an\n\
1905308Sab196087   offset directly.\n\
1915308Sab196087   \n\
1925308Sab196087   If the new-string argument is not present, the current string\n\
1935308Sab196087   at the given offset is shown. If new-string is present, it\n\
1945308Sab196087   is used to overwrite the contents of the string table at\n\
1955308Sab196087   the specified offset. The new string can have any length, as\n\
1965308Sab196087   long as it will fit in the existing size of the string table.\n\
1975308Sab196087   A terminating null character is always included in the string,\n\
1985308Sab196087   unless the -noterm option is specified. However, -noterm cannot\n\
1995308Sab196087   be used for the final byte of the string table, which must\n\
2005308Sab196087   always be NULL.\n\
2015308Sab196087   \n\
2025308Sab196087   Note:\n\
2035308Sab196087   \n\
2045308Sab196087   o\tIf new-string is longer than the existing string at\n\
2055308Sab196087   \tthe specified offset, it will overwrite the start of\n\
2065308Sab196087   \tthe following string in the string table. Any reference to\n\
2075308Sab196087   \tthat following string in the ELF file will then refer to\n\
2085308Sab196087   \tthe tail of the new-string.\n\
2095308Sab196087   \n\
2105308Sab196087   o\tELF files may have other dependencies upon the existing\n\
2115308Sab196087   \tname of an item. Changing the string for such a name to\n\
2125308Sab196087   \ta different value can create problems for the object and\n\
2135308Sab196087   \teven render it unusable.\n\
2145308Sab196087   \n\
2155308Sab196087   o\tThe dynamic string table (.dynstr) may have an unused area\n\
2165308Sab196087   \tat the end, reserved for adding new strings to the table.\n\
2175308Sab196087   \tIn this case, the dynamic section will contain a DT_SUNW_STRPAD\n\
2185308Sab196087   \tvalue giving the size of the unused space. If str:set is used\n\
2195308Sab196087   \tto modify the contents of the unused space, it will adjust\n\
2205308Sab196087   \tthe existing value of DT_SUNW_STRPAD to reflect the space used.\n"
2215308Sab196087
2225308Sab196087@ MSG_HELP_ADD	"   \
2235308Sab196087   The str:add command examines the specified string table to\n\
2245308Sab196087   determine if it contains the given string. If the string\n\
2255308Sab196087   does not exist, str:add will add it to the end, if possible.\n\
2265308Sab196087   \n\
2275308Sab196087   By default, the string table referenced by the e_shstrndx field\n\
2285308Sab196087   of the ELF header is used. The -shnam, -shndx, or -shndx options\n\
2295308Sab196087   can be used to select a different string table.\n\
2305308Sab196087   \n\
2315308Sab196087   It is only possible to add a new string to a string table\n\
2325308Sab196087   if the string table in question is the dynamic string table\n\
2335308Sab196087   (.dynstr), and if that string table has reserved space at\n\
2345308Sab196087   the end, indicated by a DT_SUNW_STRPAD entry in the dynamic\n\
2355308Sab196087   section.\n"
2365308Sab196087
2375308Sab196087@ MSG_HELP_ZERO	"   \
2385308Sab196087   The str:zero command is used to set a portion of the specified\n\
2395308Sab196087   string table to NULL (0) byte values.\n\
2405308Sab196087   \n\
2415308Sab196087   By default, the string table referenced by the e_shstrndx field\n\
2425308Sab196087   of the ELF header is used. The -shnam, -shndx, or -shndx options\n\
2435308Sab196087   can be used to select a different string table.\n\
2445308Sab196087   \n\
2455308Sab196087   The string table offset is normally determined by looking\n\
2465308Sab196087   for the specified string in the table and using its offset.\n\
2475308Sab196087   Alternatively, the -strndx option can be used to specify an\n\
2485308Sab196087   offset directly.\n\
2495308Sab196087   \n\
2505308Sab196087   The number of bytes to zero are determined as follows:\n\
2515308Sab196087   \n\
2525308Sab196087   o\tIf the -end option is specified, all bytes between the\n\
2535308Sab196087   \tstarting offset and the end of the string table are zeroed.\n\
2545308Sab196087   \n\
2555308Sab196087   o\tIf the count argument is present, the number of bytes\n\
2565308Sab196087   \tspecified are zeroed.\n\
2575308Sab196087   \n\
2585308Sab196087   o\tIf neither -end nor count are present, all bytes of the\n\
2595308Sab196087   \texisting string at the given offset are zeroed, up to the\n\
2605308Sab196087   \texisting null termination.\n\
2615308Sab196087   \n\
2625308Sab196087   The count argument and -end option are mutually exclusive. Only\n\
2635308Sab196087   one of these can be used in a given call to str:zero.\n\
2645308Sab196087   \n\
2655308Sab196087   Note:\n\
2665308Sab196087   \n\
2675308Sab196087   o\tELF files may have other dependencies upon the existing\n\
2685308Sab196087   \tname of an item. Changing the string for such a name to\n\
2695308Sab196087   \ta different value can create problems for the object and\n\
2705308Sab196087   \teven render it unusable.\n\
2715308Sab196087   \n\
2725308Sab196087   o\tThe dynamic string table (.dynstr) may have an unused area\n\
2735308Sab196087   \tat the end, reserved for adding new strings to the table.\n\
2745308Sab196087   \tIn this case, the dynamic section will contain a\n\
2755308Sab196087   \tDT_SUNW_STRPAD value giving the size of the unused space.\n\
2765308Sab196087   \tstr:zero does not alter DT_SUNW_STRPAD, or otherwise attempt\n\
2775308Sab196087   \tto \"reclaim\" space zeroed at the end of the string table.\n"
2785308Sab196087
2795308Sab196087
2805308Sab196087
2815308Sab196087@ _END_
2825308Sab196087
2835308Sab196087
2845308Sab196087# The following strings represent reserved words, files, pathnames and symbols.
2855308Sab196087# Reference to this strings is via the MSG_ORIG() macro, and thus no message
2865308Sab196087# translation is required.
2875308Sab196087
2885308Sab196087
2895308Sab196087# Miscellaneous clutter
2905308Sab196087@ MSG_STR_EMPTY			""
2915892Sab196087@ MSG_STR_MINUS_ANY		"-any"
2925308Sab196087@ MSG_STR_MINUS_END		"-end"
2935308Sab196087@ MSG_STR_MINUS_NOTERM		"-noterm"
2945308Sab196087@ MSG_STR_MINUS_SHNAM		"-shnam"
2955308Sab196087@ MSG_STR_MINUS_SHNDX		"-shndx"
2965308Sab196087@ MSG_STR_MINUS_SHTYP		"-shtyp"
2975308Sab196087@ MSG_STR_MINUS_STRNDX		"-strndx"
2985308Sab196087@ MSG_STR_COUNT			"count"
2995308Sab196087@ MSG_STR_INDEX			"index"
3005308Sab196087@ MSG_STR_NAME			"name"
3015308Sab196087@ MSG_STR_NEWSTRING		"new-string"
3025308Sab196087@ MSG_STR_STRING		"string"
3035308Sab196087@ MSG_STR_TYPE			"type"
3045892Sab196087@ MSG_STR_DQUOTE		"\""
3055892Sab196087@ MSG_STR_DQUOTENL		"\"\n"
3065308Sab196087
3075308Sab196087
3085308Sab196087# Format strings
3095308Sab196087
3105308Sab196087@ MSG_FMT_STRNL			"%s\n"
3115308Sab196087@ MSG_FMT_INDEX			"[%lld]"
3125308Sab196087@ MSG_FMT_INDEXRANGE		"[%lld-%lld]"
3135892Sab196087@ MSG_FMT_DUMPENTRY		"%15s  "
3145308Sab196087
3155308Sab196087
3165308Sab196087# Module name
3175308Sab196087
3185308Sab196087@ MSG_MOD_NAME		"str"
3195308Sab196087
3205308Sab196087
3215308Sab196087# Command names
3225308Sab196087
3235308Sab196087@ MSG_CMD_DUMP		"dump"
3245308Sab196087@ MSG_CMD_SET		"set"
3255308Sab196087@ MSG_CMD_ADD		"add"
3265308Sab196087@ MSG_CMD_ZERO		"zero"
327