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