xref: /titanic_41/usr/src/cmd/sgs/elfedit/modules/common/str.msg (revision 55ef6355bc6375ad080b10b10660e3528e2b7e6a)
1ad212f6fSab196087#
2ad212f6fSab196087# CDDL HEADER START
3ad212f6fSab196087#
4ad212f6fSab196087# The contents of this file are subject to the terms of the
5ad212f6fSab196087# Common Development and Distribution License (the "License").
6ad212f6fSab196087# You may not use this file except in compliance with the License.
7ad212f6fSab196087#
8ad212f6fSab196087# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9ad212f6fSab196087# or http://www.opensolaris.org/os/licensing.
10ad212f6fSab196087# See the License for the specific language governing permissions
11ad212f6fSab196087# and limitations under the License.
12ad212f6fSab196087#
13ad212f6fSab196087# When distributing Covered Code, include this CDDL HEADER in each
14ad212f6fSab196087# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15ad212f6fSab196087# If applicable, add the following below this CDDL HEADER, with the
16ad212f6fSab196087# fields enclosed by brackets "[]" replaced with your own identifying
17ad212f6fSab196087# information: Portions Copyright [yyyy] [name of copyright owner]
18ad212f6fSab196087#
19ad212f6fSab196087# CDDL HEADER END
20ad212f6fSab196087#
21ad212f6fSab196087
22ad212f6fSab196087#
23cce0e03bSab196087# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24ad212f6fSab196087# Use is subject to license terms.
25ad212f6fSab196087#
26ad212f6fSab196087# ident	"%Z%%M%	%I%	%E% SMI"
27ad212f6fSab196087
28ad212f6fSab196087@ _START_
29ad212f6fSab196087
30ad212f6fSab196087# Message file for elfedit 'str' module
31ad212f6fSab196087
32ad212f6fSab196087@ MSG_ID_ELFEDIT_STR
33ad212f6fSab196087
34ad212f6fSab196087
35ad212f6fSab196087# Format strings
36ad212f6fSab196087@ MSG_FMT_STRTAB	"String Table Section:  %s\n"
37ad212f6fSab196087@ MSG_FMT_DYNSTRPAD	"Dynamic String Table Padding \
38ad212f6fSab196087			 Region: [%d-%d] (%d bytes)\n"
39ad212f6fSab196087@ MSG_FMT_DUMPTITLE	"          index    value\n"
40ad212f6fSab196087
41ad212f6fSab196087# Debug messages
42ad212f6fSab196087
43ad212f6fSab196087@ MSG_DEBUG_S_OK	"[%d: %s][%d]: value unchanged: %s\n"
44ad212f6fSab196087@ MSG_DEBUG_S_CHG	"[%d: %s][%d]: change from %.*s to %s\n"
45ad212f6fSab196087@ MSG_DEBUG_Z_OK	"[%d: %s][%d]: value unchanged\n"
46ad212f6fSab196087@ MSG_DEBUG_Z_CHG	"[%d: %s][%d]: inserted %d NULL bytes\n"
47ad212f6fSab196087@ MSG_DEBUG_CHGSTR0	"[%d: %s][%d]: ELF warning: element [0] is expected \
48ad212f6fSab196087			 to contain a NULL (0) byte, and should not be \
49ad212f6fSab196087			 altered: %s\n"
50ad212f6fSab196087@ MSG_DEBUG_BADSTRPAD	"[%d: %s]: DT_SUNW_STRPAD value (%#llx) is larger \
51ad212f6fSab196087			 than string table section (%#llx), and will be \
52ad212f6fSab196087			 ignored\n"
53ad212f6fSab196087@ MSG_DEBUG_ADDDYNSTR	"[%d: %s][%d]: Using %d/%d bytes from reserved area \
54ad212f6fSab196087			 to add string: %s\n"
55ad212f6fSab196087@ MSG_DEBUG_LONGSTR	"[%d: %s][%d]: ELF warning: new string is longer \
56ad212f6fSab196087			 than previous value (%d > %d), and will overwrite \
57ad212f6fSab196087			 the beginning of the following item\n"
58ad212f6fSab196087
59ad212f6fSab196087# Errors
60ad212f6fSab196087
61ad212f6fSab196087@ MSG_ERR_STRNOTFND	"[%d: %s]: String table does not contain string: %s\n"
62ad212f6fSab196087@ MSG_ERR_NOFIT		"[%d: %s][%d]: New value would extend past end \
63ad212f6fSab196087			 of string table: %s\n"
64ad212f6fSab196087@ MSG_ERR_FINALNULL	"[%d: %s][%d]: New value would set final byte of \
65ad212f6fSab196087			 string table to non-NULL value: %s\n"
66ad212f6fSab196087
67ad212f6fSab196087
68ad212f6fSab196087
69ad212f6fSab196087# Module description
70ad212f6fSab196087
71ad212f6fSab196087@ MSG_MOD_DESC		"String Table Section"
72ad212f6fSab196087
73ad212f6fSab196087
74ad212f6fSab196087# 1-line description strings
75ad212f6fSab196087
76ad212f6fSab196087@ MSG_DESC_DUMP		"Dump String Table Section"
77ad212f6fSab196087@ MSG_DESC_SET		"Alter Existing String Table Contents"
78ad212f6fSab196087@ MSG_DESC_ADD		"Add New String to String Table"
79ad212f6fSab196087@ MSG_DESC_ZERO		"Zero String Table Region"
80ad212f6fSab196087
81ad212f6fSab196087
82ad212f6fSab196087# Command option description strings
83ad212f6fSab196087
84cce0e03bSab196087@ MSG_OPTDESC_ANY		"\
85cce0e03bSab196087   Normally, only string table sections (section type SHT_STRTAB)\n\
86*55ef6355Sab196087   or sections with the SHF_STRINGS section flag set are allowed.\n\
87*55ef6355Sab196087   If -any is set, then the specified section is used without\n\
88*55ef6355Sab196087   checking its section type, and will be treated as if it is a\n\
89*55ef6355Sab196087   string table. This can be used to examine sections that are\n\
90*55ef6355Sab196087   known to be in string table format even though they are not\n\
91*55ef6355Sab196087   properly marked as such (i.e. SHT_PROGBITS).\n"
92cce0e03bSab196087
93ad212f6fSab196087@ MSG_OPTDESC_END		"\
94ad212f6fSab196087   Zero to the end of the string table. The count argument\n\
95ad212f6fSab196087   cannot be used in conjunction with -end.\n".
96ad212f6fSab196087
97ad212f6fSab196087@ MSG_OPTDESC_NOTERM		"\
98ad212f6fSab196087   Do not write the null termination for the new string into\n\
99ad212f6fSab196087   the string table. This option cannot be used with the final\n\
100ad212f6fSab196087   position in the string table. Attempts to do so will result\n\
101ad212f6fSab196087   in an error.\n".
102ad212f6fSab196087
103ad212f6fSab196087@ MSG_OPTDESC_SHNAM		"\
104ad212f6fSab196087   Use the string table found in the ELF section with the\n\
105ad212f6fSab196087   specified name. If this is a string table section, it\n\
106ad212f6fSab196087   is used directly. If it is a section that has an associated\n\
107ad212f6fSab196087   symbol table or string table via its sh_link field, then the\n\
108ad212f6fSab196087   associated string table is used.\n"
109ad212f6fSab196087
110ad212f6fSab196087@ MSG_OPTDESC_SHNDX		"\
111ad212f6fSab196087   Use the string table found in the ELF section with the\n\
112ad212f6fSab196087   specified index. If this is a string table section, it\n\
113ad212f6fSab196087   is used directly. If it is a section that has an associated\n\
114ad212f6fSab196087   symbol table or string table via its sh_link field, then the\n\
115ad212f6fSab196087   associated string table is used.\n"
116ad212f6fSab196087
117ad212f6fSab196087@ MSG_OPTDESC_SHTYP		"\
118ad212f6fSab196087   Locate the first section in the ELF object with the\n\
119ad212f6fSab196087   given section type, and use the string table associated\n\
120ad212f6fSab196087   with it. If this is a string table section, it is used\n\
121ad212f6fSab196087   directly. If it is a section that has an associated\n\
122ad212f6fSab196087   symbol table or string table via its sh_link field, then the\n\
123ad212f6fSab196087   associated string table is used.\n"
124ad212f6fSab196087
125ad212f6fSab196087@ MSG_OPTDESC_STRNDX		"\
126ad212f6fSab196087   The string argument supplies a numeric index into the\n\
127ad212f6fSab196087   string table instead of the string value.\n".
128ad212f6fSab196087
129ad212f6fSab196087
130ad212f6fSab196087# Command argument descriptions
131ad212f6fSab196087
132ad212f6fSab196087@ MSG_A1_STRING		"String to locate in string table section.\n"
133ad212f6fSab196087
134ad212f6fSab196087@ MSG_A1_NEWSTRING	"\
135ad212f6fSab196087   New string to insert in string table section\n\
136ad212f6fSab196087   if not already present.\n"
137ad212f6fSab196087
138ad212f6fSab196087@ MSG_A2_NEWSTRING	"\
139ad212f6fSab196087   New string to overwrite previous value.\n"
140ad212f6fSab196087
141ad212f6fSab196087@ MSG_A2_COUNT	"\
142ad212f6fSab196087   Number of null bytes to write at specified offset.\n"
143ad212f6fSab196087
144ad212f6fSab196087
145ad212f6fSab196087
146ad212f6fSab196087# Help strings
147ad212f6fSab196087
148ad212f6fSab196087@ MSG_HELP_DUMP	"   \
149ad212f6fSab196087   The str:dump command is used to display information\n\
150ad212f6fSab196087   from a string table section.\n\
151ad212f6fSab196087   \n\
152ad212f6fSab196087   By default, the string table referenced by the e_shstrndx field\n\
153ad212f6fSab196087   of the ELF header is used. The -shnam, -shndx, or -shndx options\n\
154ad212f6fSab196087   can be used to select a different string table.\n\
155ad212f6fSab196087   \n\
156ad212f6fSab196087   If str:dump is called without arguments, every string in the\n\
157ad212f6fSab196087   string table is shown. If called with the string argument,\n\
158cce0e03bSab196087   the information for that string is displayed.\n\
159cce0e03bSab196087   \n\
160cce0e03bSab196087   The strings are displayed within double quotes. These quotes are\n\
161cce0e03bSab196087   not part of the actual string, and serve to visually delimit the\n\
162cce0e03bSab196087   actual string. Printable characters are shown as themselves, while\n\
163cce0e03bSab196087   non-printable characters are shown using the same notation used\n\
164cce0e03bSab196087   by the C programming language for literal string constants:\n\
165cce0e03bSab196087   \n\
166cce0e03bSab196087   \t\\a\talert (bell)\n\
167cce0e03bSab196087   \t\\b\tbackspace\n\
168cce0e03bSab196087   \t\\f\tform feed\n\
169cce0e03bSab196087   \t\\n\tnewline\n\
170cce0e03bSab196087   \t\\r\treturn\n\
171cce0e03bSab196087   \t\\t\thorizontal tab\n\
172cce0e03bSab196087   \t\\v\tvertical tab\n\
173cce0e03bSab196087   \t\\\\\tbackslash\n\
174cce0e03bSab196087   \t\\'\tsingle quote\n\
175cce0e03bSab196087   \t\\\"\tdouble quote\n\
176cce0e03bSab196087   \t\\ooo\tAn octal constant, where ooo is one to three\n\
177cce0e03bSab196087   \t\t\toctal digits (0..7)\n"
178ad212f6fSab196087
179ad212f6fSab196087@ MSG_HELP_SET	"   \
180ad212f6fSab196087   The str:set command is used to display or alter the existing\n\
181ad212f6fSab196087   contents of the string table section.\n\
182ad212f6fSab196087   \n\
183ad212f6fSab196087   By default, the string table referenced by the e_shstrndx field\n\
184ad212f6fSab196087   of the ELF header is used. The -shnam, -shndx, or -shndx options\n\
185ad212f6fSab196087   can be used to select a different string table.\n\
186ad212f6fSab196087   \n\
187ad212f6fSab196087   The string table offset is normally determined by looking\n\
188ad212f6fSab196087   for the specified string in the table and using its offset.\n\
189ad212f6fSab196087   Alternatively, the -strndx option can be used to specify an\n\
190ad212f6fSab196087   offset directly.\n\
191ad212f6fSab196087   \n\
192ad212f6fSab196087   If the new-string argument is not present, the current string\n\
193ad212f6fSab196087   at the given offset is shown. If new-string is present, it\n\
194ad212f6fSab196087   is used to overwrite the contents of the string table at\n\
195ad212f6fSab196087   the specified offset. The new string can have any length, as\n\
196ad212f6fSab196087   long as it will fit in the existing size of the string table.\n\
197ad212f6fSab196087   A terminating null character is always included in the string,\n\
198ad212f6fSab196087   unless the -noterm option is specified. However, -noterm cannot\n\
199ad212f6fSab196087   be used for the final byte of the string table, which must\n\
200ad212f6fSab196087   always be NULL.\n\
201ad212f6fSab196087   \n\
202ad212f6fSab196087   Note:\n\
203ad212f6fSab196087   \n\
204ad212f6fSab196087   o\tIf new-string is longer than the existing string at\n\
205ad212f6fSab196087   \tthe specified offset, it will overwrite the start of\n\
206ad212f6fSab196087   \tthe following string in the string table. Any reference to\n\
207ad212f6fSab196087   \tthat following string in the ELF file will then refer to\n\
208ad212f6fSab196087   \tthe tail of the new-string.\n\
209ad212f6fSab196087   \n\
210ad212f6fSab196087   o\tELF files may have other dependencies upon the existing\n\
211ad212f6fSab196087   \tname of an item. Changing the string for such a name to\n\
212ad212f6fSab196087   \ta different value can create problems for the object and\n\
213ad212f6fSab196087   \teven render it unusable.\n\
214ad212f6fSab196087   \n\
215ad212f6fSab196087   o\tThe dynamic string table (.dynstr) may have an unused area\n\
216ad212f6fSab196087   \tat the end, reserved for adding new strings to the table.\n\
217ad212f6fSab196087   \tIn this case, the dynamic section will contain a DT_SUNW_STRPAD\n\
218ad212f6fSab196087   \tvalue giving the size of the unused space. If str:set is used\n\
219ad212f6fSab196087   \tto modify the contents of the unused space, it will adjust\n\
220ad212f6fSab196087   \tthe existing value of DT_SUNW_STRPAD to reflect the space used.\n"
221ad212f6fSab196087
222ad212f6fSab196087@ MSG_HELP_ADD	"   \
223ad212f6fSab196087   The str:add command examines the specified string table to\n\
224ad212f6fSab196087   determine if it contains the given string. If the string\n\
225ad212f6fSab196087   does not exist, str:add will add it to the end, if possible.\n\
226ad212f6fSab196087   \n\
227ad212f6fSab196087   By default, the string table referenced by the e_shstrndx field\n\
228ad212f6fSab196087   of the ELF header is used. The -shnam, -shndx, or -shndx options\n\
229ad212f6fSab196087   can be used to select a different string table.\n\
230ad212f6fSab196087   \n\
231ad212f6fSab196087   It is only possible to add a new string to a string table\n\
232ad212f6fSab196087   if the string table in question is the dynamic string table\n\
233ad212f6fSab196087   (.dynstr), and if that string table has reserved space at\n\
234ad212f6fSab196087   the end, indicated by a DT_SUNW_STRPAD entry in the dynamic\n\
235ad212f6fSab196087   section.\n"
236ad212f6fSab196087
237ad212f6fSab196087@ MSG_HELP_ZERO	"   \
238ad212f6fSab196087   The str:zero command is used to set a portion of the specified\n\
239ad212f6fSab196087   string table to NULL (0) byte values.\n\
240ad212f6fSab196087   \n\
241ad212f6fSab196087   By default, the string table referenced by the e_shstrndx field\n\
242ad212f6fSab196087   of the ELF header is used. The -shnam, -shndx, or -shndx options\n\
243ad212f6fSab196087   can be used to select a different string table.\n\
244ad212f6fSab196087   \n\
245ad212f6fSab196087   The string table offset is normally determined by looking\n\
246ad212f6fSab196087   for the specified string in the table and using its offset.\n\
247ad212f6fSab196087   Alternatively, the -strndx option can be used to specify an\n\
248ad212f6fSab196087   offset directly.\n\
249ad212f6fSab196087   \n\
250ad212f6fSab196087   The number of bytes to zero are determined as follows:\n\
251ad212f6fSab196087   \n\
252ad212f6fSab196087   o\tIf the -end option is specified, all bytes between the\n\
253ad212f6fSab196087   \tstarting offset and the end of the string table are zeroed.\n\
254ad212f6fSab196087   \n\
255ad212f6fSab196087   o\tIf the count argument is present, the number of bytes\n\
256ad212f6fSab196087   \tspecified are zeroed.\n\
257ad212f6fSab196087   \n\
258ad212f6fSab196087   o\tIf neither -end nor count are present, all bytes of the\n\
259ad212f6fSab196087   \texisting string at the given offset are zeroed, up to the\n\
260ad212f6fSab196087   \texisting null termination.\n\
261ad212f6fSab196087   \n\
262ad212f6fSab196087   The count argument and -end option are mutually exclusive. Only\n\
263ad212f6fSab196087   one of these can be used in a given call to str:zero.\n\
264ad212f6fSab196087   \n\
265ad212f6fSab196087   Note:\n\
266ad212f6fSab196087   \n\
267ad212f6fSab196087   o\tELF files may have other dependencies upon the existing\n\
268ad212f6fSab196087   \tname of an item. Changing the string for such a name to\n\
269ad212f6fSab196087   \ta different value can create problems for the object and\n\
270ad212f6fSab196087   \teven render it unusable.\n\
271ad212f6fSab196087   \n\
272ad212f6fSab196087   o\tThe dynamic string table (.dynstr) may have an unused area\n\
273ad212f6fSab196087   \tat the end, reserved for adding new strings to the table.\n\
274ad212f6fSab196087   \tIn this case, the dynamic section will contain a\n\
275ad212f6fSab196087   \tDT_SUNW_STRPAD value giving the size of the unused space.\n\
276ad212f6fSab196087   \tstr:zero does not alter DT_SUNW_STRPAD, or otherwise attempt\n\
277ad212f6fSab196087   \tto \"reclaim\" space zeroed at the end of the string table.\n"
278ad212f6fSab196087
279ad212f6fSab196087
280ad212f6fSab196087
281ad212f6fSab196087@ _END_
282ad212f6fSab196087
283ad212f6fSab196087
284ad212f6fSab196087# The following strings represent reserved words, files, pathnames and symbols.
285ad212f6fSab196087# Reference to this strings is via the MSG_ORIG() macro, and thus no message
286ad212f6fSab196087# translation is required.
287ad212f6fSab196087
288ad212f6fSab196087
289ad212f6fSab196087# Miscellaneous clutter
290ad212f6fSab196087@ MSG_STR_EMPTY			""
291cce0e03bSab196087@ MSG_STR_MINUS_ANY		"-any"
292ad212f6fSab196087@ MSG_STR_MINUS_END		"-end"
293ad212f6fSab196087@ MSG_STR_MINUS_NOTERM		"-noterm"
294ad212f6fSab196087@ MSG_STR_MINUS_SHNAM		"-shnam"
295ad212f6fSab196087@ MSG_STR_MINUS_SHNDX		"-shndx"
296ad212f6fSab196087@ MSG_STR_MINUS_SHTYP		"-shtyp"
297ad212f6fSab196087@ MSG_STR_MINUS_STRNDX		"-strndx"
298ad212f6fSab196087@ MSG_STR_COUNT			"count"
299ad212f6fSab196087@ MSG_STR_INDEX			"index"
300ad212f6fSab196087@ MSG_STR_NAME			"name"
301ad212f6fSab196087@ MSG_STR_NEWSTRING		"new-string"
302ad212f6fSab196087@ MSG_STR_STRING		"string"
303ad212f6fSab196087@ MSG_STR_TYPE			"type"
304cce0e03bSab196087@ MSG_STR_DQUOTE		"\""
305cce0e03bSab196087@ MSG_STR_DQUOTENL		"\"\n"
306ad212f6fSab196087
307ad212f6fSab196087
308ad212f6fSab196087# Format strings
309ad212f6fSab196087
310ad212f6fSab196087@ MSG_FMT_STRNL			"%s\n"
311ad212f6fSab196087@ MSG_FMT_INDEX			"[%lld]"
312ad212f6fSab196087@ MSG_FMT_INDEXRANGE		"[%lld-%lld]"
313cce0e03bSab196087@ MSG_FMT_DUMPENTRY		"%15s  "
314ad212f6fSab196087
315ad212f6fSab196087
316ad212f6fSab196087# Module name
317ad212f6fSab196087
318ad212f6fSab196087@ MSG_MOD_NAME		"str"
319ad212f6fSab196087
320ad212f6fSab196087
321ad212f6fSab196087# Command names
322ad212f6fSab196087
323ad212f6fSab196087@ MSG_CMD_DUMP		"dump"
324ad212f6fSab196087@ MSG_CMD_SET		"set"
325ad212f6fSab196087@ MSG_CMD_ADD		"add"
326ad212f6fSab196087@ MSG_CMD_ZERO		"zero"
327