xref: /titanic_44/usr/src/cmd/sgs/elfedit/modules/common/shdr.msg (revision 75ce41a57ff334bd8fe2cb9ed51eea835892f944)
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 'shdr' module
31
32@ MSG_ID_ELFEDIT_SHDR
33
34
35# Section header format
36@ MSG_ELF_SHDR		"Section Header[%d]:  sh_name: %s\n"
37
38# Debug messages
39
40@ MSG_DEBUG_S_OK	"shdr[%d: %s].%s: value unchanged: %s\n"
41@ MSG_DEBUG_S_CHG	"shdr[%d: %s].%s: change from %s to %s\n"
42@ MSG_DEBUG_LLX_OK	"shdr[%d: %s].%s: value unchanged: %#llx\n"
43@ MSG_DEBUG_LLX_CHG	"shdr[%d: %s].%s: change from %#llx to %#llx\n"
44@ MSG_DEBUG_D_OK	"shdr[%d: %s].%s: value unchanged: %d\n"
45@ MSG_DEBUG_D_CHG	"shdr[%d: %s].%s: change from %d to %d\n"
46@ MSG_DEBUG_CHGSHDR0	"ELF warning: Unexpected direct change to \
47			 section header [0]: Header [0] is used for \
48			 extended section and program headers by the ehdr \
49			 module, and should otherwise be completely zero\n"
50@ MSG_DEBUG_ADDRALIGN	"ELF warning: sh_addralign value is expected to \
51			 be 0, 1, or a power of 2: %s\n"
52
53
54# Module description
55
56@ MSG_MOD_DESC		"Section Header Array"
57
58
59# 1-line description strings
60
61@ MSG_DESC_DUMP		"Dump Section Headers"
62
63@ MSG_DESC_SH_ADDR	"Section memory address"
64@ MSG_DESC_SH_ADDRALIGN	"Section address alignment"
65@ MSG_DESC_SH_ENTSIZE	"Section per-item size"
66@ MSG_DESC_SH_FLAGS	"Section flags"
67@ MSG_DESC_SH_INFO	"Section info"
68@ MSG_DESC_SH_LINK	"Section link"
69@ MSG_DESC_SH_NAME	"Section name"
70@ MSG_DESC_SH_OFFSET	"Section file offset"
71@ MSG_DESC_SH_SIZE	"Section size (bytes)"
72@ MSG_DESC_SH_TYPE	"Section type"
73
74
75# Command option description strings
76
77@ MSG_OPTDESC_SHNDX	"\
78   Interpret the sec argument as a section index rather than\n\
79   as a section name. section can be one of the well known SHN_\n\
80   symbolic constants, or any integer.\n"
81
82@ MSG_OPTDESC_SHTYP	"\
83   Interpret the sec argument as a section type rather than\n\
84   as a section name. section can be one of the well known SHT_\n\
85   symbolic constants, or any integer.\n"
86
87@ MSG_OPTDESC_NAME_OFFSET	"\
88   Interpret the name argument as a string table offset rather\n\
89   than as a string.\n"
90
91@ MSG_OPTDESC_VALUE_SHNAM	"\
92   Interpret the value argument as a section name rather than\n\
93   as an integer. The index of the first section with the\n\
94   specified name will be used as the value.\n"
95
96@ MSG_OPTDESC_VALUE_SHTYP	"\
97   Interpret the value argument as a section type rather than\n\
98   as an integer. The index of the first section of the specified\n\
99   type will be used as the value. value can be one of the well\n\
100   known SHT_ symbolic constants, or any integer.\n"
101
102
103# Command argument descriptions
104
105@ MSG_A1_SEC	"\
106   Section to examine or modify. By default, this argument is\n\
107   interpreted as the name of the desired section. The section\n\
108   index of the first section with the specified name is used.\n\
109   \n\
110   If -shndx is set, then sec is a section index, and is\n\
111   interpreted as an integer, or one of the well known SHN_\n\
112   symbolic constant names.\n\
113   \n\
114   If -shtyp is set, then sec is a section type, and is\n\
115   interpreted as an integer, or one of the well known SHT_\n\
116   symbolic constant names. The section index of the first\n\
117   section with the specified type is used.\n"
118
119@ MSG_A2_DESC_SH_ADDR	"Integer value to set for section address.\n"
120
121@ MSG_A2_DESC_SH_ADDRALIGN "\
122   Integer value to set for section alignment.\n"
123
124@ MSG_A2_DESC_SH_ENTSIZE "\
125   Integer value to set for size of an individual element in\n\
126   a section of fixed-size entries.\n"
127
128@ MSG_A2_DESC_SH_FLAGS "\
129   Section flags. SHF_ flag constants are accepted, as is\n\
130   any integer.\n"
131
132@ MSG_A2_DESC_SH_INFO	"\
133   Integer value to set for symbol sh_info field. The meaning\n\
134   of this value depends on the type of the section.\n"
135
136@ MSG_A2_DESC_SH_LINK	"\
137   Integer value to set for symbol sh_link field. The meaning\n\
138   of this value depends on the type of the section.\n"
139
140@ MSG_A2_DESC_SH_NAME	"\
141   Name to set for section. If the -name_offset option is\n\
142   used, this is an integer offset into the section header\n\
143   string table. Otherwise, it is a string, which will be\n\
144   looked up in the symbol table in order to obtain the needed\n\
145    offset value.\n"
146
147@ MSG_A2_DESC_SH_OFFSET	"\
148   Integer value to set for symbol sh_offset field. The value\n\
149   of sh_offset gives the byte offset from the beginning of\n\
150   the file to the first byte in the section. For SHT_NOBITS\n\
151   sections, this member indicates the conceptual offset in the\n\
152   file, as the section occupies no space in the file.\n"
153
154@ MSG_A2_DESC_SH_SIZE	"\
155   Integer value to set for size of section, in bytes. Unless the\n\
156   section type is SHT_NOBITS, the section occupies sh_size bytes\n\
157   in the file. A section of type SHT_NOBITS can have a nonzero\n\
158   size, but the section occupies no space in the file.\n"
159
160@ MSG_A2_DESC_SH_TYPE	"\
161   Value to set for section type. The value can be an integer,\n\
162   or one of the well known SHT_ symbolic constant names.\n"
163
164
165
166# Help strings
167
168@ MSG_HELP_DUMP	"   \
169   The shdr:dump command is used to display section header\n\
170    information using the same style used by the elfdump program.\n\
171   \n\
172   If shdr:dump is called without arguments, information for every\n\
173   section header in the object is shown. If called with the shndx\n\
174   argument, the section header at that index is displayed.\n"
175
176@ MSG_HELP_SH_ADDR	"   \
177   The shdr:sh_addr command is used to display or alter the\n\
178   starting virtual memory address of the section.\n\
179   \n\
180   If the section appears in the memory image of a process,\n\
181   this member gives the address at which the sections's\n\
182   first byte should reside. Otherwise, the member is expected\n\
183   to contain the value zero.\n\
184   \n\
185   If shdr:sh_addr is called without arguments, the value of\n\
186   sh_addr for every section in the section header array is\n\
187   shown. If called with the shndx argument, the value of the\n\
188   section at that index is displayed. If both arguments are\n\
189   present, the sh_addr field of the section at the specified\n\
190   index is set to the given value.\n"
191
192@ MSG_HELP_SH_ADDRALIGN	"   \
193   The shdr:sh_addralign command is used to display or alter the\n\
194   alignment constraint for the section.\n\
195   \n\
196   Some sections have address alignment constraints. For example,\n\
197   if a section holds a double-word, the system must ensure\n\
198   double-word alignment for the entire section. In this case,\n\
199   the value of sh_addr must be congruent to 0, modulo the value\n\
200   of sh_addralign. Currently, only 0 and positive integral\n\
201   powers of 2 are used in Solaris ELF files. Values 0 and 1\n\
202   mean the section has no alignment constraints.\n\
203   \n\
204   If shdr:sh_addralign is called without arguments, the value\n\
205   of sh_addralign for every section in the section header array\n\
206   is shown. If called with the shndx argument, the value of the\n\
207   section at that index is displayed. If both arguments are\n\
208   present, the sh_addralign field of the section at the specified\n\
209   index is set to the given value.\n"
210
211@ MSG_HELP_SH_ENTSIZE	"   \
212   The shdr:sh_entsize command is used to display or alter the\n\
213   per-item entry size for the section.\n\
214   \n\
215   Some sections hold a table of fixed-size entries, such as a\n\
216   symbol table. For such a section, this member gives the size\n\
217   in bytes of each entry. By convention, the member is set to\n\
218   the value zero if the section does not hold a table of\n\
219   fixed-size entries.\n\
220   \n\
221   If shdr:sh_entsize is called without arguments, the value\n\
222   of sh_entsize for every section in the section header array\n\
223   is shown. If called with the shndx argument, the value of the\n\
224   section at that index is displayed. If both arguments are\n\
225   present, the sh_entsize field of the section at the specified\n\
226   index is set to the given value.\n"
227
228@ MSG_HELP_SH_FLAGS	"   \
229   The shdr:sh_flags command is used to display or alter the\n\
230   flags that are associated with the section.\n\
231   \n\
232   \n\
233   If shdr:sh_flags is called without arguments, the value\n\
234   of sh_flags for every section in the section header array\n\
235   is shown. If called with the shndx argument, the value of\n\
236   the section at that index is displayed. If one or more\n\
237   value arguments are present, the following steps are taken:\n\
238   \n   \
239   o\tAll the value arguments are OR'd together.\n\
240   \n   \
241   o\tIf the -cmp option has been specified, the new value\n\
242   \tis complemented.\n\
243   \n   \
244   o\tThe sh_flags field of the section header is updated with\n\
245   \tthe new value. If -and is specified, the new value is\n\
246   \tAND'd against the existing value. If -or is specified,\n\
247   \tthe new value is OR'd against the existing value. If\n\
248   \tneither -and or -or are specified, the new value replaces\n\
249   \tthe existing value.\n"
250
251@ MSG_HELP_SH_INFO	"   \
252   The shdr:sh_info command is used to display or alter the\n\
253   sh_info field of the specified section.\n\
254   \n\
255   sh_info contains extra information, the interpretation\n\
256   of which depends on the section type.\n\
257   \n\
258   If shdr:sh_info is called without arguments, the value\n\
259   of sh_info for every section in the section header array\n\
260   is shown. If called with the shndx argument, the value of the\n\
261   section at that index is displayed. If both arguments are\n\
262   present, the sh_info field of the section at the specified\n\
263   index is set to the given value.\n"
264
265@ MSG_HELP_SH_LINK	"   \
266   The shdr:sh_link command is used to display or alter the\n\
267   sh_link field of the specified section.\n\
268   \n\
269   sh_link contains extra information, the interpretation\n\
270   of which depends on the section type.\n\
271   \n\
272   If shdr:sh_link is called without arguments, the value\n\
273   of sh_link for every section in the section header array\n\
274   is shown. If called with the shndx argument, the value of the\n\
275   section at that index is displayed. If both arguments are\n\
276   present, the sh_link field of the section at the specified\n\
277   index is set to the given value.\n"
278
279@ MSG_HELP_SH_NAME	"   \
280   The shdr:sh_name command is used to display or alter the\n\
281   name associated with a specified section.\n\
282   \n\
283   The sh_name field of a section header is an index into\n\
284   the section header string table section giving the location\n\
285   of a null terminated string.\n\
286   \n\
287   If shdr:sh_name is called without arguments, the name of\n\
288   every section in the section header array is shown. If called\n\
289   with the shndx argument, the name of the section at that\n\
290   index is displayed. If both arguments are present, the\n\
291   sh_name field of the section at the specified index is set\n\
292   to the given value.\n\
293   \n\
294   When changing the name of a section, you should be aware\n\
295   that the name selected must exist within the section header\n\
296   string table, as it is not possible to add new strings to\n\
297   this string table.\n"
298
299@ MSG_HELP_SH_OFFSET	"   \
300   The shdr:sh_offset command is used to display or alter the\n\
301   sh_offset field of the specified section.\n\
302   \n\
303   sh_offset provides the byte offset from the beginning of\n\
304   the file to the first byte in the section. For a SHT_NOBITS\n\
305   section, this member indicates the conceptual offset in\n\
306   the file, as the section occupies no space in the file.\n\
307   \n\
308   If shdr:sh_offset is called without arguments, the value\n\
309   of sh_offset for every section in the section header array\n\
310   is shown. If called with the shndx argument, the value of the\n\
311   section at that index is displayed. If both arguments are\n\
312   present, the sh_offset field of the section at the specified\n\
313   index is set to the given value.\n"
314
315@ MSG_HELP_SH_SIZE	"   \
316   The shdr:sh_size command is used to display or alter the\n\
317   sh_size field of the specified section.\n\
318   \n\
319   sh_size provides the section's size in bytes. Unless the\n\
320   section type is SHT_NOBITS, the section occupies sh_size\n\
321   bytes in the file. A section of type SHT_NOBITS can have\n\
322   a non-zero size, but the section occupies no space in the file.\n\
323   \n\
324   If shdr:sh_size is called without arguments, the value\n\
325   of sh_size for every section in the section header array\n\
326   is shown. If called with the shndx argument, the value of the\n\
327   section at that index is displayed. If both arguments are\n\
328   present, the sh_size field of the section at the specified\n\
329   index is set to the given value.\n"
330
331@ MSG_HELP_SH_TYPE	"   \
332   The shdr:sh_type command is used to display or alter the\n\
333   sh_type field of the specified section.\n\
334   \n\
335   The type of a section categorizes the section's contents\n\
336   and semantics.\n\
337   \n\
338   If shdr:sh_type is called without arguments, the value\n\
339   of sh_type for every section in the section header array\n\
340   is shown. If called with the shndx argument, the value of the\n\
341   section at that index is displayed. If both arguments are\n\
342   present, the sh_type field of the section at the specified\n\
343   index is set to the given value.\n"
344
345
346
347@ _END_
348
349
350# The following strings represent reserved words, files, pathnames and symbols.
351# Reference to this strings is via the MSG_ORIG() macro, and thus no message
352# translation is required.
353
354
355# Miscellaneous clutter
356@ MSG_STR_EMPTY			""
357@ MSG_STR_NL			"\n"
358@ MSG_STR_MINUS_SHNDX		"-shndx"
359@ MSG_STR_MINUS_SHTYP		"-shtyp"
360@ MSG_STR_MINUS_NAME_OFFSET	"-name_offset"
361@ MSG_STR_MINUS_VALUE_SHNAM	"-value_shnam"
362@ MSG_STR_MINUS_VALUE_SHTYP	"-value_shtyp"
363@ MSG_STR_NAME			"name"
364@ MSG_STR_SEC			"sec"
365@ MSG_STR_VALUE			"value"
366
367
368# Format strings
369
370@ MSG_FMT_WORDVALNL		"%u\n"
371@ MSG_FMT_WORDHEXNL		"%#x\n"
372@ MSG_FMT_XWORDHEXNL		"%#llx\n"
373@ MSG_FMT_STRNL			"%s\n"
374
375
376# Module name
377
378@ MSG_MOD_NAME		"shdr"
379
380
381# Command names
382
383@ MSG_CMD_DUMP		"dump"
384
385@ MSG_CMD_SH_ADDR	"sh_addr"
386@ MSG_CMD_SH_ADDRALIGN	"sh_addralign"
387@ MSG_CMD_SH_ENTSIZE	"sh_entsize"
388@ MSG_CMD_SH_FLAGS	"sh_flags"
389@ MSG_CMD_SH_INFO	"sh_info"
390@ MSG_CMD_SH_LINK	"sh_link"
391@ MSG_CMD_SH_NAME	"sh_name"
392@ MSG_CMD_SH_OFFSET	"sh_offset"
393@ MSG_CMD_SH_SIZE	"sh_size"
394@ MSG_CMD_SH_TYPE	"sh_type"
395