xref: /titanic_50/usr/src/cmd/sgs/elfedit/modules/common/sym.msg (revision bfed486ad8de8b8ebc6345a8e10accae08bf2f45)
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 2008 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 'sym' module
31
32@ MSG_ID_ELFEDIT_SYM
33
34
35# Command argument strings
36@ MSG_ARG_SECNDX	"symbol section index"
37@ MSG_ARG_SYM		"Name of desired symbol within symbol table(s)"
38@ MSG_ARG_SYMVIS	"symbol visibility"
39@ MSG_ARG_SYMBIND	"symbol binding"
40
41# Names of things we allocate dynamically
42
43@ MSG_ALLOC_ARGSTATE		"symbol table state"
44
45# Format strings
46@ MSG_FMT_SYMTAB		"Symbol Table Section:  %s\n"
47
48# Debug messages
49
50@ MSG_DEBUG_S_OK	"[%d: %s][%d].%s: value unchanged: %s\n"
51@ MSG_DEBUG_S_CHG	"[%d: %s][%d].%s: change from %s to %s\n"
52@ MSG_DEBUG_EXT_S_OK	"[%d: %s][%d]: value unchanged: %s\n"
53@ MSG_DEBUG_EXT_S_CHG	"[%d: %s][%d]: change from %s to %s\n"
54@ MSG_DEBUG_D_OK	"[%d: %s][%d].%s: value unchanged: %d\n"
55@ MSG_DEBUG_D_CHG	"[%d: %s][%d].%s: change from %d to %d\n"
56@ MSG_DEBUG_LLX_OK	"[%d: %s][%d].%s: value unchanged: %#llx\n"
57@ MSG_DEBUG_LLX_CHG	"[%d: %s][%d].%s: change from %#llx to %#llx\n"
58@ MSG_DEBUG_SHNDX_UNDEF0 "ELF warning: symbol [0] is expected to reference \
59			 SHN_UNDEF\n"
60@ MSG_DEBUG_SHNDX_XINDEX	"ELF warning: SHN_XINDEX is not supposed to \
61			 be set directly\n"
62@ MSG_DEBUG_SHNDX_EFORCE "[%d: %s][%d]: ELF warning: Section index does not \
63			 normally go in extended index section: %d\n"
64@ MSG_DEBUG_LBINDGSYM	"[%d: %s][%d]: ELF warning: local binding set for \
65			 symbol in global part of symbol table \
66			 (shdr[%d].sh_info == %d)\n"
67@ MSG_DEBUG_GBINDLSYM	"[%d: %s][%d]: ELF warning: global binding set for \
68			 symbol in local part of symbol table \
69			 (shdr[%d].sh_info == %d)\n"
70@ MSG_DEBUG_DYNSYMNAMCHG	"[%d: %s][%d]: ELF warning: changing the name \
71			 of a symbol in the dynamic symbol table will confuse \
72			 the hash section and likely render the object \
73			 unusable\n"
74@ MSG_DEBUG_CHGSYMELT0	"[%d: %s][%d]: ELF warning: Symbol [0] is expected \
75			 to be NULL\n"
76
77# Errors
78
79@ MSG_ERR_NOSYMTAB	"Object does not have any symbol tables\n";
80@ MSG_ERR_NEEDEXPSYMTAB	"The -symndx option requires a symbol table to be \
81			 explicitly specified (-shnam, -shndx, or \
82			 -shtyp options)\n"
83
84
85
86# Module description
87
88@ MSG_MOD_DESC		"Symbol Section"
89
90
91# 1-line description strings
92
93@ MSG_DESC_DUMP		"Dump Symbol Table"
94@ MSG_DESC_ST_BIND	"Symbol binding"
95@ MSG_DESC_ST_INFO	"st_info (binding and type)"
96@ MSG_DESC_ST_NAME	"Symbol name"
97@ MSG_DESC_ST_OTHER	"st_other (visibility)"
98@ MSG_DESC_ST_SHNDX	"Symbol section index"
99@ MSG_DESC_ST_SIZE	"Symbol size"
100@ MSG_DESC_ST_TYPE	"Symbol type"
101@ MSG_DESC_ST_VALUE	"Symbol value"
102@ MSG_DESC_ST_VISIBILITY "Symbol visibility"
103
104
105# Command option description strings
106
107@ MSG_OPTDESC_E		"\
108   Force the use of the extended index section to hold the\n\
109   specified section index, even if it is small enough to fit\n\
110   into the symbol st_shndx field. Note that this will produce\n\
111   a non-standard ELF file.\n"
112@ MSG_OPTDESC_SHNDX	"\
113   Use the symbol table found in the ELF section with the\n\
114   specified index.\n"
115@ MSG_OPTDESC_SHNAM	"\
116   Use the symbol table found in the ELF section with the\n\
117   specified name.\n"
118@ MSG_OPTDESC_SHTYP	"\
119   Use the first symbol table found in the ELF section with\n\
120    the specified section type.\n"
121@ MSG_OPTDESC_SECSHNDX	"\
122   Interpret the sec argument as a section index rather than\n\
123   as a section name. section can be one of the well known SHN_\n\
124   symbolic constants, or any integer.\n"
125@ MSG_OPTDESC_SECSHTYP	"\
126   Interpret the sec argument as a section type rather than\n\
127   as a section name. section can be one of the well known SHT_\n\
128   symbolic constants, or any integer.\n"
129@ MSG_OPTDESC_NAME_OFFSET	"\
130   Interpret the name argument as a string table offset rather\n\
131   than as a string.\n"
132
133@ MSG_OPTDESC_SYMNDX		"\
134   The sym argument supplies a numeric index into the symbol\n\
135   section instead of the name of the symbol. The symbol table\n\
136   to use must be explicitly specified (-shnam, -shndx, or\n\
137   -shtyp option) when -symndx is used.\n".
138
139# Command argument descriptions
140
141@ MSG_A1_SYM		"Name of desired symbol within symbol table.\n"
142
143@ MSG_A2_DESC_ST_BIND	"Symbol binding. STB_ symbol constants are\n\
144   accepted, as is any integer in the range 0 - 15.\n"
145
146@ MSG_A2_DESC_ST_INFO	"Integer value to set for symbol st_info field.\n\
147   Note that the fact that the value of st_info affects both\n\
148   the symbol binding and type values.\n"
149
150@ MSG_A2_DESC_ST_NAME	"\
151   Name to set for symbol. If the -name_offset option is used,\n\
152    this is an integer offset into the string table section\n\
153   associated with the symbol table. Otherwise, it is a string,\n\
154   which will be looked up in the symbol table (and inserted if\n\
155   necessary, and if possible) in order to obtain the needed\n\
156   offset value.\n"
157
158@ MSG_A2_DESC_ST_OTHER	"\
159   Integer value to set for symbol st_other field. Note\n\
160   that the fact that the value of st_other affects the\n\
161   symbol visibility value.\n"
162
163@ MSG_A2_DESC_ST_SEC	"\
164   Section to set for symbol section index. By default, this\n\
165   argument is interpreted as the name of the desired section.\n\
166   The section index of the first section with the specified\n\
167   name is used.\n\
168   \n\
169   If -secshndx is set, then sec is a section index,\n\
170   and is interpreted as an integer, or one of the well known\n\
171   SHN_ symbolic constant names.\n\
172   \n\
173   If -secshtyp is set, then sec is a section type,\n\
174   and is interpreted as an integer, or one of the well known\n\
175   SHT_ symbolic constant names. The section index of the first\n\
176   section with the specified type is used.\n"
177
178
179@ MSG_A2_DESC_ST_SIZE	"Integer value to set for symbol size.\n"
180
181@ MSG_A2_DESC_ST_TYPE	"\
182   Symbol type. STT_ symbol constants are accepted, as is any\n\
183   integer in the range 0 - 15.\n"
184
185@ MSG_A2_DESC_ST_VALUE	"Integer value to set for symbol value.\n"
186
187@ MSG_A2_DESC_ST_VISIBILITY "\
188   Symbol visibility. STV_ symbol constants are accepted, as\n\
189   are integer values.\n"
190
191
192
193# Help strings
194
195@ MSG_HELP_DUMP	"   \
196   The sym:dump command is used to display symbol information\n\
197   using the same style used by the elfdump program.\n\
198   \n\
199   By default, symbols are taken from all available symbol tables.\n\
200   The symbol table to use can be changed using the -shnam, -shndx,\n\
201   or -shtyp options. Only one of these options can be used at a time.\n\
202   \n\
203   If sym:dump is called without arguments, information for every\n\
204   symbol in the symbol table is shown. If called with the symndx\n\
205   argument, the information forthe symbol at that index is\n\
206   displayed.\n"
207
208@ MSG_HELP_ST_BIND	"   \
209   The sym:st_bind command is used to display or alter symbol\n\
210   binding. Symbol binding is found in the st_bind portion of the\n\
211   st_info field of an ELF symbol.\n\
212   \n\
213   By default, symbols are taken from all available symbol tables.\n\
214   The symbol table to use can be changed using the -shnam, -shndx,\n\
215   or -shtyp options. Only one of these options can be used at a time.\n\
216   \n\
217   If sym:st_bind is called without arguments, the value of\n\
218   st_bind for every symbol in the symbol table is shown. If\n\
219   called with the symndx argument, the value of the symbol at that\n\
220   index is displayed. If both arguments are present, the st_bind\n\
221   field of the symbol at the specified index is set to the given\n\
222   value.\n"
223
224@ MSG_HELP_ST_INFO	"   \
225   The sym:st_info command is used to display or alter the\n\
226   st_info field of the specified symbol. It provides raw access\n\
227   to the entire st_info value. Normally, the sym:st_bind or sym:st_type\n\
228   commands are used in preference to sym:st_info.\n\
229   \n\
230   By default, symbols are taken from all available symbol tables.\n\
231   The symbol table to use can be changed using the -shnam, -shndx,\n\
232   or -shtyp options. Only one of these options can be used at a time.\n\
233   If sym:st_info is called without arguments, the value of st_info\n\
234   for every symbol in the symbol table is shown. If called with the\n\
235   symndx argument, the value of the symbol at that index is displayed.\n\
236   If both arguments are present, the st_info field of the symbol at\n\
237   the specified index is set to the given value.\n"
238
239@ MSG_HELP_ST_NAME	"   \
240   The sym:st_name command is used to display or alter the\n\
241   name associated with a specified symbol.\n\
242   \n\
243   By default, symbols are taken from all available symbol tables.\n\
244   The symbol table to use can be changed using the -shnam, -shndx,\n\
245   or -shtyp options. Only one of these options can be used at a time.\n\
246   \n\
247   If sym:st_name is called without arguments, the value of st_name\n\
248   for every symbol in the symbol table is shown. If called with the\n\
249   symndx argument, the name of the symbol at that index is displayed.\n\
250   If both arguments are present, the name field of the symbol at\n\
251   the specified index is set to the given value.\n\
252   \n\
253   When changing the name of a symbol, you should be aware of the\n\
254   following limitations:\n\
255   \n   \
256   o\tIt is only possible to change the name of a symbol in a\n\
257   \tnon-dynamic symbol table to one of the names already found\n\
258   \tin the associated string table.\n\
259   \n   \
260   o\tChanging the name of a symbol in the dynamic symbol table\n\
261   \twill lead to the hash table having inaccurate information\n\
262   \tabout the symbol table, and is likely render the object\n\
263   \tunusable.\n"
264
265@ MSG_HELP_ST_OTHER	"   \
266   The sym:st_other command is used to display or alter the\n\
267   st_other field of the specified symbol. It provides raw access\n\
268   to the entire st_other value. Normally, the sym:st_visibility\n\
269   command is used in preference to sym:st_other.\n\
270   \n\
271   By default, symbols are taken from all available symbol tables.\n\
272   The symbol table to use can be changed using the -shnam, -shndx,\n\
273   or -shtyp options. Only one of these options can be used at a time.\n\
274   \n\
275   If sym:st_other is called without arguments, the value of st_other\n\
276   for every symbol in the symbol table is shown. If called with the\n\
277   symndx argument, the value of the symbol at that index is displayed.\n\
278   If both arguments are present, the st_other field of the symbol at\n\
279   the specified index is set to the given value.\n"
280
281@ MSG_HELP_ST_SHNDX	"   \
282   Every symbol table entry is defined in relation to some section.\n\
283   This information is maintained in the st_shndx field of an ELF\n\
284   symbol. The sym:st_shndx command is used to display or alter the\n\
285   st_shndx field of the specified symbol.\n\
286   \n\
287   By default, symbols are taken from all available symbol tables.\n\
288   The symbol table to use can be changed using the -shnam, -shndx,\n\
289   or -shtyp options. Only one of these options can be used at a time.\n\
290   \n\
291   If sym:st_shndx is called without arguments, the value of st_shndx\n\
292   for every symbol in the symbol table is shown. If called with the\n\
293   symndx argument, the value of the symbol at that index is displayed.\n\
294   If both arguments are present, the st_shndx field of the symbol at\n\
295   the specified index is set to the given value.\n\
296   \n\
297   sym:st_shndx is aware of extended section indexes, and will\n\
298   access/modify the extended index sections associated with a given\n\
299   symbol table as necessary.\n"
300
301@ MSG_HELP_ST_SIZE	"   \
302   The sym:st_size command is used to display or alter the\n\
303   size of the specified symbol (st_size field).\n\
304   \n\
305   By default, symbols are taken from all available symbol tables.\n\
306   The symbol table to use can be changed using the -shnam, -shndx,\n\
307   or -shtyp options. Only one of these options can be used at a time.\n\
308   \n\
309   If sym:st_size is called without arguments, the value of st_size\n\
310   for every symbol in the symbol table is shown. If called with\n\
311   the symndx argument, the size of the symbol at that index is\n\
312   displayed. If both arguments are present, the st_size field of\n\
313   the symbol at the specified index is set to the given value.\n"
314
315@ MSG_HELP_ST_TYPE	"   \
316   The sym:st_type command is used to display or alter the\n\
317   st_type portion of the st_info field of the specified\n\
318   symbol.\n\
319   \n\
320   By default, symbols are taken from all available symbol tables.\n\
321   The symbol table to use can be changed using the -shnam, -shndx,\n\
322   or -shtyp options. Only one of these options can be used at a time.\n\
323   \n\
324   If sym:st_type is called without arguments, the value of\n\
325   st_type for every symbol in the symbol table is shown. If\n\
326   called with the symndx argument, the value of the symbol at that\n\
327   index is displayed. If both arguments are present, the st_type\n\
328   field of the symbol at the specified index is set to the given value.\n"
329
330@ MSG_HELP_ST_VALUE	"   \
331   The sym:st_value command is used to display or alter the\n\
332   value of the specified symbol (st_value field).\n\
333   \n\
334   By default, symbols are taken from all available symbol tables.\n\
335   The symbol table to use can be changed using the -shnam, -shndx,\n\
336   or -shtyp options. Only one of these options can be used at a time.\n\
337   \n\
338   If sym:st_value is called without arguments, the value of\n\
339   st_value for every symbol in the symbol table is shown. If\n\
340   called with the symndx argument, the value of the symbol at that\n\
341   index is displayed. If both arguments are present, the st_value\n\
342   field of the symbol at the specified index is set to the given value.\n"
343
344@ MSG_HELP_ST_VISIBILITY	"   \
345   The sym:st_visibility command is used to display or alter the\n\
346   st_visibility portion of the st_other field of the specified\n\
347   symbol.\n\
348   \n\
349   By default, symbols are taken from all available symbol tables.\n\
350   The symbol table to use can be changed using the -shnam, -shndx,\n\
351   or -shtyp options. Only one of these options can be used at a time.\n\
352   \n\
353   If sym:st_visibility is called without arguments, the value of\n\
354   st_visibility for every symbol in the symbol table is shown. If\n\
355   called with the symndx argument, the value of the symbol at that\n\
356   index is displayed. If both arguments are present, the st_visibility\n\
357   field of the symbol at the specified index is set to the given value.\n"
358
359
360@ _END_
361
362
363# The following strings represent reserved words, files, pathnames and symbols.
364# Reference to this strings is via the MSG_ORIG() macro, and thus no message
365# translation is required.
366
367
368# Miscellaneous clutter
369@ MSG_STR_EMPTY			""
370@ MSG_STR_NL			"\n"
371@ MSG_STR_MINUS_E		"-e"
372@ MSG_STR_MINUS_SHNAM		"-shnam"
373@ MSG_STR_MINUS_SHNDX		"-shndx"
374@ MSG_STR_MINUS_SHTYP		"-shtyp"
375@ MSG_STR_MINUS_SYMNDX		"-symndx"
376@ MSG_STR_MINUS_NAME_OFFSET	"-name_offset"
377@ MSG_STR_MINUS_SECSHNDX	"-secshndx"
378@ MSG_STR_MINUS_SECSHTYP	"-secshtyp"
379@ MSG_STR_INDEX			"index"
380@ MSG_STR_NAME			"name"
381@ MSG_STR_SEC			"sec"
382@ MSG_STR_SYM			"sym"
383@ MSG_STR_TYPE			"type"
384@ MSG_STR_VALUE			"value"
385
386
387# Format strings
388
389@ MSG_FMT_WORDVALNL		"%u\n"
390@ MSG_FMT_XWORDVALNL_32		"0x%8.8x\n"
391@ MSG_FMT_XWORDVALNL_64		"0x%16.16llx\n"
392@ MSG_FMT_STRNL			"%s\n"
393@ MSG_FMT_INDEX			" [%lld]"
394
395
396# Module name
397
398@ MSG_MOD_NAME		"sym"
399
400
401# Command names
402
403@ MSG_CMD_DUMP		"dump"
404@ MSG_CMD_ST_BIND	"st_bind"
405@ MSG_CMD_ST_INFO	"st_info"
406@ MSG_CMD_ST_NAME	"st_name"
407@ MSG_CMD_ST_OTHER	"st_other"
408@ MSG_CMD_ST_SHNDX	"st_shndx"
409@ MSG_CMD_ST_SIZE	"st_size"
410@ MSG_CMD_ST_TYPE	"st_type"
411@ MSG_CMD_ST_VALUE	"st_value"
412@ MSG_CMD_ST_VISIBILITY	"st_visibility"
413