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