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