xref: /titanic_51/usr/src/cmd/sgs/elfedit/modules/common/dyn.msg (revision 1e49577a7fcde812700ded04431b49d67cc57d6d)
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
29@ _START_
30
31# Message file for elfedit 'dyn' module
32
33@ MSG_ID_ELFEDIT_DYN
34
35
36# Strings
37@ MSG_STR_DEPRECATED	"(deprecated value)"
38
39# Debug messages
40
41@ MSG_DEBUG_S_OK	"[%d: %s][%d]: value unchanged: %s\n"
42@ MSG_DEBUG_S_CHG	"[%d: %s][%d]: change from %s to %s\n"
43@ MSG_DEBUG_X_OK	"[%d: %s][%d]: value unchanged: %#llx\n"
44@ MSG_DEBUG_X_CHG	"[%d: %s][%d]: change from %#llx to %#llx\n"
45@ MSG_DEBUG_PREVRPATH	"[%d: %s][%d]: Reusing existing %s entry: %s\n"
46@ MSG_DEBUG_OLDRPATHOK	"[%d: %s][%d]: Existing %s already has desired \
47			 value\n"
48@ MSG_DEBUG_CONVNULL	"[%d: %s][%d]: No existing %s to modify. Converting \
49			 extra DT_NULL\n"
50@ MSG_DEBUG_DT2NDX	"[%d: %s][%d]: Dynamic entry for tag: %s\n"
51@ MSG_DEBUG_NULCLIP	"[%d: %s][%d]: ELF warning: null element will cause \
52			 the runtime linker to ignore the non-null \
53			 elements that follow: %s\n"
54@ MSG_DEBUG_NULHIDE	"[%d: %s][%d]: ELF warning: this non-null element \
55			 follows the first DT_NULL element, and will be \
56			 ignored by the runtime linker: %s\n"
57@ MSG_DEBUG_NULLTERM	"[%d: %s][%d]: ELF warning: dynamic section is \
58			 must be terminated by a DT_NULL. The runtime linker \
59			 will be unable to use this object: %s\n"
60@ MSG_DEBUG_DTNULLVALUE	"[%d: %s][%d]: ELF warning: DT_NULL element value \
61			 is expected to be 0: %#llx\n"
62
63
64# Errors
65
66@ MSG_ERR_NODTELT	"[%d: %s]: Dynamic section does not contain tag: %s\n"
67@ MSG_ERR_NOEXTRANULL	"[%d: %s]: Dynamic section does not have room to add \
68			 a new element\n"
69@ MSG_ERR_NORUNPATH	"[%d: %s]: no runpath (DT_RPATH or DT_RUNPATH) found\n"
70@ MSG_ERR_NODYNELT	"[%d: %s]: no elements of type %s found\n"
71@ MSG_ERR_STRPADSTRVAL	"[%d: %s]: -s option cannot be used with \
72			 DT_SUNW_STRPAD dynamic element\n"
73@ MSG_ERR_WRONGTAG	"[%d: %s][%d]: expected %s dynamic element: %s\n"
74@ MSG_ERR_NEEDEDNOMATCH	"[%d: %s]: matching DT_NEEDED element not found: %s\n";
75
76
77# Module description
78
79@ MSG_MOD_DESC		"Dynamic Section"
80
81
82
83# 1-line description strings
84
85@ MSG_DESC_DUMP		"Dump Dynamic Section"
86@ MSG_DESC_TAG		"Change element tag"
87@ MSG_DESC_VALUE	"Change element value"
88@ MSG_DESC_DELETE	"Delete elements"
89@ MSG_DESC_MOVE		"Move elements"
90@ MSG_DESC_RUNPATH	"Set runpath"
91@ MSG_DESC_POSFLAG1	"DT_POSFLAG_1 bit values"
92@ MSG_DESC_FLAGS	"DT_FLAGS bit values"
93@ MSG_DESC_FLAGS1	"DT_FLAGS_1 bit values"
94@ MSG_DESC_FEATURE1	"DT_FEATURE_1 bit values"
95@ MSG_DESC_CHECKSUM	"Recompute DT_CHECKSUM"
96@ MSG_DESC_SUNW_LDMACH	"Linker machine type"
97
98
99# Commmand option description strings
100
101@ MSG_OPTDESC_ADD	"\
102   By default, dyn:value modifies the first element of the\n\
103   dynamic section that has the specified tag type, creating\n\
104   a new element only if no element of the specified type\n\
105   exists, and if room exists in the file. If -add is specified,\n\
106   dyn:value will always create a new element for the new value,\n\
107   leaving any existing elements with the same tag untouched.\n"
108
109@ MSG_OPTDESC_S		"\
110   Interpret the value argument as a string rather than an\n\
111   integer. If the specified string already exists in the dynamic\n\
112   string table, the offset of that string is stored in the\n\
113   dynamic entry. If the string does not exist in the string table,\n\
114   but there is room to add it, the new string is added and then\n\
115   the offset is placed in the dynamic entry.\n"
116
117@ MSG_OPTDESC_DYNNDX_ELT	"\
118   Interpret the elt argument as a direct index into the dynamic\n\
119   section, rather than as a DT_ tag value.\n"
120
121@ MSG_OPTDESC_DYNNDX_VAL	"\
122   Use the dynamic element with the specified index.\n"
123
124@ MSG_OPTDESC_NEEDED	"\
125   Select the first DT_POSFLAG_1 dynamic element that corresponds\n\
126   to the DT_NEEDED element with a value that starts with the\n\
127   string given by prefix. If present, the DT_POSFLAG_1 element\n\
128   will be in the dynamic element directly in front of the\n\
129   DT_NEEDED element.\n"
130
131
132# Command argument description strings
133
134@ MSG_A1_TAG_ELT	"\
135   Dynamic element to be examined or changed. By default, this\n\
136   is a DT_ tag value. The index of the first element in the\n\
137   dynamic section that has the specified tag value will be used.\n\
138   The value specified can be one of the well known DT_ constants,\n\
139   or any integer.\n\
140   \n\
141   If the -dynndx option is specified, elt is instead interpreted\n\
142   as a simple integer index into the dynamic section.\n"
143
144@ MSG_A2_TAG_VALUE	"\
145   Value to be set for d_tag field of specified dynamic\n\
146   element. Tag values can be specified using the well known\n\
147   DT_ symbolic constants from /usr/include/sys/link.h, or\n\
148   as integers.\n"
149
150@ MSG_ARGDESC_ELT	"\
151   Element within dynamic section. By default, this is a tag\n\
152   value. In this case, the index of the first dynamic element\n\
153   with the specified tag value will be used. Tag values can\n\
154   be specified using the well known DT_ symbolic constants from\n\
155   /usr/include/sys/link.h, or as integers. If the -dynndx\n\
156   option is specified, then elt is instead interpreted as a\n\
157   direct numeric index into the dynamic section.\n"
158
159@ MSG_A2_VALUE_VALUE	"\
160   Value to set for specified dynamic section element. By\n\
161   default, this is a numeric value which is used directly.\n\
162   If the -s option is used, this is a string value, and the\n\
163   dynamic element will receive the numeric offset of the\n\
164   specified string from within the associated dynamic string\n\
165   table.\n"
166
167@ MSG_A2_DELETE_COUNT	"\
168   Number of dynamic elements to delete, starting at the\n\
169   specified position. This value cannot exceed the number\n\
170   of slots remaining in the table below the specified position.\n\
171   If count is not supplied, a single element is deleted.\n"
172
173@ MSG_A2_MOVE_DST_INDEX	"\
174   Numeric index within dynamic section to which the element(s)\n\
175   should be moved.\n"
176
177@ MSG_A3_MOVE_COUNT	"\
178   Number of dynamic elements to move. This value cannot\n\
179   exceed the number of slots remaining in the table below\n\
180   the specified position. If count is not supplied, a\n\
181   single element is moved.\n"
182
183@ MSG_A1_RUNPATH_NEWPATH	"\
184   New runpath string for the ELF object.\n"
185
186@ MSG_A1_POSFLAG1_VALUE "\
187   Position dependent state flags which are applied to the\n\
188   element immediately following. This can be an integer\n\
189   value, or any of the DF_P1_ symbolic constants defined\n\
190   in /usr/include/sys/link.h\n"
191
192@ MSG_A1_FLAGS_VALUE	"\
193   Flag values. This can be an integer value, or any of the\n\
194   DF_ symbolic constants defined in /usr/include/sys/link.h\n"
195
196@ MSG_A1_FLAGS1_VALUE	"\
197   Flag values. This can be an integer value, or any of the\n\
198   DF_1_ symbolic constants defined in /usr/include/sys/link.h\n"
199
200@ MSG_A1_FEATURE1_VALUE	"\
201   Feature values. This can be an integer value, or any of\n\
202   the DTF_1_ symbolic constants defined in\n\
203   /usr/include/sys/link.h\n"
204
205@ MSG_A1_SUNW_LDMACH_VALUE	"\
206   Machine type of link-editor that built the object being edited.\n\
207   This can be an integer value, or any of the EM_ symbolic\n\
208   constants defined in /usr/include/elf.h\n"
209
210
211# Help strings
212
213@ MSG_HELP_DUMP	"   \
214   The dyn:dump command is used to display the contents of the\n\
215   dynamic section using the same style used by the elfdump program.\n"
216
217@ MSG_HELP_TAG	"   \
218   The dyn:tag command is used to display or alter the\n\
219   type of an element in the dynamic section. This information\n\
220   is found in the d_tag field of a dynamic element.\n\
221   \n\
222   If dyn:tag is called without arguments, the value of d_tag\n\
223   for every element in the dynamic section is shown. If called\n\
224   with the elt argument, the specified elements are displayed.\n\
225   If both arguments are present, the d_tag field of the specified\n\
226   dynamic element is set to the given value.\n"
227
228@ MSG_HELP_VALUE	"   \
229   The dyn:value command is used to display or alter the\n\
230   value of an element in the dynamic section, or to add\n\
231   a new element of a desired type. The value of a dynamic\n\
232   element is found in the d_un union of the element.\n\
233   \n\
234   If dyn:value is called without arguments, the value of every\n\
235   element in the dynamic section is shown. If called with the\n\
236   elt argument, the value of the specified elements are displayed.\n\
237   If both arguments are present, the value of the specified\n\
238   dynamic element is set to the given value.\n"
239
240@ MSG_HELP_DELETE	"   \
241   The dyn:delete command is used to delete one or more elements\n\
242   in the dynamic section. The elements following the deleted\n\
243   items move up, and new DT_NULL elements are inserted at the\n\
244   end of the dynamic section to fill the vacated space.\n\
245   \n\
246   Other parts of the ELF object may have dependencies on the\n\
247   position and values of existing dynamic elements. Moving or\n\
248   deleting dynamic elements can therefore break the object,\n\
249   and should be done with caution. Among the potential issues:\n\
250   \n\
251   o\tDT_POSFLAG_1 has a positional dependency on the item that\n\
252   \tfollows it. If that item is removed, the DT_POSFLAG_1 will\n\
253   \tapply to the new item that moves below it.\n\
254   \n\
255   o\tSyminfo sections reference DT_NEEDED elements in the dynamic\n\
256   \tsection by index. Moving or deleting such elements will break\n\
257   \tthis dependency.\n"
258
259@ MSG_HELP_MOVE	"   \
260   The dyn:move command is used to move the position of one\n\
261   or more elements in the dynamic section. The specified\n\
262   number of elements are moved from elt to dst_index.\n\
263   \n\
264   Other parts of the ELF object may have dependencies on the\n\
265   position and values of existing dynamic elements. Moving or\n\
266   deleting dynamic elements can therefore break the object,\n\
267   and should be done with caution. Among the potential issues:\n\
268   \n\
269   o\tDT_POSFLAG_1 has a positional dependency on the item that\n\
270   \tfollows it. If that item is removed, the DT_POSFLAG_1 will\n\
271   \tapply to the new item that moves below it.\n\
272   \n\
273   o\tSyminfo sections reference DT_NEEDED elements in the dynamic\n\
274   \tsection by index. Moving or deleting such elements will break\n\
275   \tthis dependency.\n"
276
277@ MSG_HELP_RUNPATH	"   \
278   The dyn:runpath command is used to display or alter the\n\
279   runpath of the ELF object.\n\
280   \n\
281   If dyn:runpath is called without arguments, the existing runpath\n\
282   is shown. If called with the newpath argument, the runpath is set\n\
283   to the given string, if possible.\n\
284   \n\
285   Not all files can be modified to have a new runpath:\n\
286   \n\
287   o\tThe desired string must already exist in the dynamic string\n\
288   \ttable, or there must be enough room in the reserved section\n\
289   \tsection at the end (DT_SUNW_STRPAD) for the new string to be\n\
290   \tadded.\n\
291   \n\
292   o\tThe dynamic section must already have a DT_RPATH or DT_RUNPATH\n\
293   \telement, or there must be an extra DT_NULL slot at the end\n\
294   \twhere a DT_RUNPATH can be inserted.\n\
295   \n\
296   If the file has both DT_RPATH and DT_RUNPATH elements in\n\
297   the dynamic section, both are set to the new value. If no\n\
298   runpath entry exists, a new DT_RUNPATH is inserted if the room\n\
299   for it exists.\n"
300
301@ MSG_HELP_POSFLAG1	"   \
302   The dyn:posflag1 command is used to display or alter\n\
303   DT_POSFLAG_1 flags values. DT_POSFLAG_1 is a positional\n\
304   dynamic element that affects the interpretation of the item\n\
305   that follows it. Therefore, when displaying DT_POSFLAG_1 elements\n\
306   using the default output style, dyn:posflag1 also displays the\n\
307   dynamic element that follows it.\n\
308   \n\
309   If dyn:posflag1 is called without arguments, the current\n\
310   value of all DT_POSFLAG_1 elements are shown. It is possible\n\
311   to display the value of a single specific DT_POSFLAG_1 element\n\
312   by using the -dynndx or -needed option to specify it.\n\
313   \n\
314   If one or more value arguments are present, the default is to\n\
315   modify the first DT_POSFLAG_1 element. The -dynndx or -needed\n\
316   option can be used to specify a specific DT_POSFLAG_1_element\n\
317   instead. The following steps are taken to compute the new value:\n\
318   \n   \
319   o\tAll the value arguments are OR'd together.\n\
320   \n   \
321   o\tIf the -cmp option has been specified, the new value\n\
322   \tis complemented.\n\
323   \n   \
324   o\tThe DT_POSFLAG_1 element is updated with the new value.\n\
325   \tIf -and is specified, the new value is AND'd against the\n\
326   \texisting value. If -or is specified, the new value is OR'd\n\
327   \tagainst the existing value. If neither -and or -or are\n\
328   \tspecified, the new value replaces the existing value.\n\
329   \n\
330   A new DT_POSFLAG_1 element is inserted in the dynamic section\n\
331   when all of the following are true:\n\
332   \n   \
333   o\tOne or more value arguments are present.\n\
334   \n   \
335   o\tThe -dynndx and -needed options are not used.\n\
336   \n   \
337   o\tThe current dynamic section does not have a current\n\
338   \tDT_POSFLAG_1 element.\n\
339   \n   \
340   o\tThere is available space at the end of the dynamic section.\n"
341
342@ MSG_HELP_FLAGS	"   \
343   The dyn:flags command is used to display or alter the\n\
344   value of the DT_FLAGS dynamic element.\n\
345   \n\
346   If dyn:flags is called without arguments, the current\n\
347   value is shown. If one or more value arguments are present,\n\
348   the following steps are taken:\n\
349   \n   \
350   o\tAll the value arguments are OR'd together.\n\
351   \n   \
352   o\tIf the -cmp option has been specified, the new value\n\
353   \tis complemented.\n\
354   \n   \
355   o\tThe DT_FLAGS element of the dynamic section is updated\n\
356   \twith the new value. If -and is specified, the new value is\n\
357   \tAND'd against the existing value. If -or is specified,\n\
358   \tthe new value is OR'd against the existing value. If\n\
359   \tneither -and or -or are specified, the new value replaces\n\
360   \tthe existing value.\n\
361   \n\
362   If the current dynamic section does not have a current\n\
363   DT_FLAGS element, and room for it exists at the end\n\
364   of the section, a new one is inserted.\n"
365
366@ MSG_HELP_FLAGS1	"   \
367   The dyn:flags1 command is used to display or alter the\n\
368   value of the DT_FLAGS_1 dynamic element.\n\
369   \n\
370   If dyn:flags1 is called without arguments, the current\n\
371   value is shown. If one or more value arguments are present,\n\
372   the following steps are taken:\n\
373   \n   \
374   o\tAll the value arguments are OR'd together.\n\
375   \n   \
376   o\tIf the -cmp option has been specified, the new value\n\
377   \tis complemented.\n\
378   \n   \
379   o\tThe DT_FLAGS_1 element of the dynamic section is updated\n\
380   \twith the new value. If -and is specified, the new value is\n\
381   \tAND'd against the existing value. If -or is specified,\n\
382   \tthe new value is OR'd against the existing value. If\n\
383   \tneither -and or -or are specified, the new value replaces\n\
384   \tthe existing value.\n\
385   \n\
386   If the current dynamic section does not have a current\n\
387   DT_FLAGS_1 element, and room for it exists at the end\n\
388   of the section, a new one is inserted.\n"
389
390@ MSG_HELP_FEATURE1	"   \
391   The dyn:feature1 command is used to display or alter the\n\
392   value of the DT_FEATURE_1 dynamic element.\n\
393   \n\
394   If dyn:feature1 is called without arguments, the current\n\
395   value is shown. If one or more value arguments are present,\n\
396   the following steps are taken:\n\
397   \n   \
398   o\tAll the value arguments are OR'd together.\n\
399   \n   \
400   o\tIf the -cmp option has been specified, the new value\n\
401   \tis complemented.\n\
402   \n   \
403   o\tThe DT_FEATURE_1 element of the dynamic section is updated\n\
404   \twith the new value. If -and is specified, the new value is\n\
405   \tAND'd against the existing value. If -or is specified,\n\
406   \tthe new value is OR'd against the existing value. If\n\
407   \tneither -and or -or are specified, the new value replaces\n\
408   \tthe existing value.\n\
409   \n\
410   If the current dynamic section does not have a current\n\
411   DT_FEATURE_1 element, and room for it exists at the end\n\
412   of the section, a new one is inserted.\n"
413
414@ MSG_HELP_CHECKSUM	"   \
415   The dyn:checksum command recomputes the value of the DT_CHECKSUM\n\
416   dynamic element. It calls the elf32_checksum() for 32-bit objects,\n\
417   or elf64_checksum() for 64-bit objects, and then sets the value of\n\
418   the DT_CHECKSUM element to the resulting value.\n\
419   \n\
420   If the current dynamic section does not have a current\n\
421   DT_CHECKSUM element, and room for it exists at the end\n\
422   of the section, a new one is inserted.\n"
423
424@ MSG_HELP_SUNW_LDMACH	"   \
425   The dyn:sunw_ldmach command is used to display or alter the\n\
426   DT_SUNW_LDMACH dynamic element of the ELF object. This dynamic\n\
427   element records the ELF machine type of the link-editor that produced\n\
428   the object. This is of special interest if the object was built\n\
429   by a cross link-editor instead of being linked on a machine of the\n\
430   same type as the object.\n\
431   \n\
432   If dyn:sunw_ldmach is called without arguments, the current\n\
433   value is shown. If called with the value argument, the\n\
434   DT_SUNW_LDMACH dynamic element is set to the specified machine type.\n\
435   \n\
436   If the current dynamic section does not have a current\n\
437   DT_SUNW_LDMACH element, and room for it exists at the end\n\
438   of the section, a new one is inserted.\n"
439
440@ _END_
441
442
443# The following strings represent reserved words, files, pathnames and symbols.
444# Reference to this strings is via the MSG_ORIG() macro, and thus no message
445# translation is required.
446
447
448# Strings
449@ MSG_STR_EMPTY		""
450@ MSG_STR_COUNT		"count"
451@ MSG_STR_ELT		"elt"
452@ MSG_STR_DST_INDEX	"dst_index"
453@ MSG_STR_INDEX		"index"
454@ MSG_STR_MINUS_ADD	"-add"
455@ MSG_STR_MINUS_DYNNDX	"-dynndx"
456@ MSG_STR_MINUS_NEEDED	"-needed"
457@ MSG_STR_MINUS_S	"-s"
458@ MSG_STR_NEWPATH	"newpath"
459@ MSG_STR_PREFIX	"prefix"
460@ MSG_STR_VALUE		"value"
461
462# Format strings
463@ MSG_FMT_STRNL		"%s\n"
464@ MSG_FMT_HEXXWORDNL	"%#llx\n"
465
466
467# Module name
468
469@ MSG_MOD_NAME		"dyn"
470
471
472# Command names
473
474@ MSG_CMD_DUMP		"dump"
475@ MSG_CMD_TAG		"tag"
476@ MSG_CMD_VALUE		"value"
477@ MSG_CMD_DELETE	"delete"
478@ MSG_CMD_MOVE		"move"
479@ MSG_CMD_RUNPATH	"runpath"
480@ MSG_CMD_RUNPATH_A1	"rpath"
481@ MSG_CMD_POSFLAG1	"posflag1"
482@ MSG_CMD_FLAGS		"flags"
483@ MSG_CMD_FLAGS1	"flags1"
484@ MSG_CMD_FEATURE1	"feature1"
485@ MSG_CMD_CHECKSUM	"checksum"
486@ MSG_CMD_SUNW_LDMACH	"sunw_ldmach"
487