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