xref: /titanic_50/usr/src/cmd/sgs/elfedit/common/elfedit.msg (revision 1787f50304cd7e85910a3e14f639ac892c0d76b7)
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 2009 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26
27@ _START_
28
29# Message file for cmd/sgs/elfedit.
30
31@ MSG_ID_ELFEDIT
32
33
34# Usage Messages
35
36@ MSG_USAGE_BRIEF	"usage: elfedit [-adrw] [-e cmd] [-L modpath] \
37			 [-o style] [file] [outfile]\n"
38@ MSG_USAGE_DETAIL1	"\t[-a]          Autoprint (show edit results)\n"
39@ MSG_USAGE_DETAIL2	"\t[-d]          Issue messages describing internal \
40			 operations\n"
41@ MSG_USAGE_DETAIL3	"\t[-e cmd]      edit command\n"
42@ MSG_USAGE_DETAIL4	"\t[-L modpath]  Set module path\n"
43@ MSG_USAGE_DETAIL5	"\t[-o ostyle]   Output style (default|simple|num)\n"
44@ MSG_USAGE_DETAIL6	"\t[-r]          Readonly session (outfile not \
45			 allowed)\n"
46@ MSG_USAGE_DETAIL_LAST	"\n\tExtensive help for edit commands is available.\n\
47			 \tEnter 'help' at the elfedit prompt.\n"
48@ MSG_USAGE_CMD		"usage: %s\n"
49
50
51# sys:set option names
52
53@ MSG_SYSSET_A		"autoprint flag"
54@ MSG_SYSSET_D		"debug flag"
55
56
57# Names of things we allocate dynamically
58
59@ MSG_ALLOC_OBJSTATE	"object state"
60@ MSG_ALLOC_SYMTABOS	"symbol table information buffer"
61@ MSG_ALLOC_MODDEF	"module definition"
62@ MSG_ALLOC_UCMD	"user command state"
63@ MSG_ALLOC_UCMDSTR	"user command string buffer"
64@ MSG_ALLOC_TOKBUF	"user command token buffer"
65@ MSG_ALLOC_BATCHLST	"list of -e commands"
66@ MSG_ALLOC_EXPATH	"expanded module search path"
67@ MSG_ALLOC_PATHARR	"search path array"
68@ MSG_ALLOC_HELPITEM	"help state"
69@ MSG_ALLOC_SECMSGPRE	"section message prefix string"
70@ MSG_ALLOC_ELFCONDESC	"ELF constant string descriptors"
71
72# Format strings
73
74@ MSG_FMT_BUILTIN	"<built in>"
75@ MSG_FMT_UNKNOWN	"<unknown>"
76
77# Debug messages
78
79@ MSG_DEBUG_ADDDYNFLG	"[%d: %s][%d]: Set DF_1_EDITED flag\n"
80@ MSG_DEBUG_SEEDYNFLG	"[%d: %s][%d]: Previously edited file \
81			 (DF_1_EDITED flag is set) \n"
82@ MSG_DEBUG_CMDALIAS	"Command %s:%s is an alias for %s:%s\n"
83@ MSG_DEBUG_MODLOAD	"load module: %s: %s\n"
84@ MSG_DEBUG_MODUNLOAD	"unload module: %s: %s\n"
85@ MSG_DEBUG_CPFILE	"copied %s to output file: %s\n";
86@ MSG_DEBUG_UNLINKFILE	"unlink unsaved output file: %s\n";
87@ MSG_DEBUG_VERSION	"%d-bit version\n"
88@ MSG_DEBUG_READONLY	"session is readonly\n";
89@ MSG_DEBUG_NOFILE	"no ELF object specified. Limited functionalty is available\n";
90@ MSG_DEBUG_DIRTYEXIT	"discarding unsaved edits\n";
91@ MSG_DEBUG_FNDSEC	"[%d: %s]: section\n"
92@ MSG_DEBUG_FNDCAP	"[%d: %s]: capabilities section\n"
93@ MSG_DEBUG_FNDDYN	"[%d: %s]: dynamic section\n"
94@ MSG_DEBUG_FNDSTR	"[%d: %s][%d]: string: %s\n"
95@ MSG_DEBUG_FNDSTRTAB	"[%d: %s]: string table section (SHT_STRTAB)\n"
96@ MSG_DEBUG_FNDSTRTABFL	"[%d: %s]: string table section (SHF_STRINGS)\n"
97@ MSG_DEBUG_FNDSYMTAB	"[%d: %s]: %s symbol table section\n"
98@ MSG_DEBUG_FNDSYMINFO	"[%d: %s]: syminfo section\n"
99@ MSG_DEBUG_FNDVERSYM	"[%d: %s]: versym section: [%d: %s]\n"
100@ MSG_DEBUG_FNDXSHNDX	"[%d: %s]: extended section index section: [%d: %s]\n"
101@ MSG_DEBUG_EXISTSTR	"[%d: %s][%d]: Found existing string in section: %s\n"
102@ MSG_DEBUG_ADDSTR	"[%d: %s][%d]: Using %d/%d bytes from reserved area \
103			 to add string: %s\n"
104@ MSG_DEBUG_NULL2DYNFL1	"[%d: %s]: No existing flags1 field to modify. \
105			 Will use extra DT_NULL in slot [%d] \n"
106@ MSG_DEBUG_AUX_LINK	"[%d: %s]: Ignoring section: sh_link field references \
107			 non-symbol table section: [%d]\n"
108@ MSG_DEBUG_AUX_SIZE "[%d: %s][%d]: Ignoring section: Not enough elements \
109			 for corresponding symbol table: [%d: %s][%d]\n"
110@ MSG_DEBUG_EXECCMD	"command: %s\n"
111@ MSG_DEBUG_SHNAM2NDX	"[%d: %s]: section name: %s\n"
112@ MSG_DEBUG_SYMNAM2NDX	"[%d: %s][%d]: symbol \"%s\"\n"
113@ MSG_DEBUG_INPLACEWARN	"warning: editing input file in place is not \
114			 recommended: %s\n"
115@ MSG_DEBUG_SHNDX_RANGE	"Specified section index [%d] is outside of valid \
116			 of range for this object: 0-%d\n"
117@ MSG_DEBUG_ARRCPY_1	"%s: copy array element [%d] to [%d]\n"
118@ MSG_DEBUG_ARRCPY_N	"%s: copy array elements [%d-%d] to [%d-%d]\n"
119@ MSG_DEBUG_ARRZERO_1	"%s[%d]: zero array element\n"
120@ MSG_DEBUG_ARRZERO_N	"%s[%d-%d]: zero %d array elements\n"
121@ MSG_DEBUG_ARRMOVE_1	"%s: moved element [%d] to [%d]\n"
122@ MSG_DEBUG_ARRMOVE_N	"%s: moved %d elements from [%d-%d] to [%d-%d]\n"
123
124# Errors
125
126@ MSG_ERR_NOFILSYSONLY	"No ELF object specified. Only commands from \
127			 module sys: are allowed: %s:%s\n"
128@ MSG_ERR_BADOSTYLE	"Unrecognized output style \
129			 (default|simple|num): %s\n"
130@ MSG_ERR_BADCONST	"internal error: bad constant value in \
131			 elfedit_const_to_atoui()\n"
132@ MSG_ERR_BADGETVAL	"internal error: bad required value passed to \
133			 elfedit_XXX_get_value()\n"
134@ MSG_ERR_PATHTOOLONG	"path too long: %s/%s.so\n"
135@ MSG_ERR_CNTDLOPEN	"unable to load module sharable object %s: %s\n"
136@ MSG_ERR_CNTDLCLOSE	"unable to unload module sharable object %s: %s\n"
137@ MSG_ERR_ESCEOL	"backslash escape cannot be used at end of line\n"
138@ MSG_ERR_BADCESC	"unrecognized escape in double quoted token: \\%c\n"
139@ MSG_ERR_UNTERMQUOTE	"command is missing closing quote: %c\n"
140@ MSG_ERR_UNRECMOD	"no such module: %s\n"
141@ MSG_ERR_UNRECCMD	"no such command: %s:%s\n"
142@ MSG_ERR_SONOTMOD	"sharable object is not a valid elfedit module: %s\n"
143@ MSG_ERR_CNTULSMOD	"cannot unload built in module: %s\n"
144@ MSG_ERR_NULLPRICMDNAM	"module has empty string for primary command: %s\n"
145@ MSG_ERR_BADMODLOAD	"elfedit module failed to initialize: %s\n"
146@ MSG_ERR_BADMODNAME	"sharable library provides module '%s' rather \
147			 than expected '%s': %s\n"
148@ MSG_ERR_OPT_MODPRE	"command option name must start with \
149			 a '-': %s : %s:%s %s\n"
150@ MSG_ERR_OPT_MODLEN	"command option name must have at least one character: \
151			 %s : %s:%s %s\n"
152@ MSG_ERR_OPT_EXCMASKN0	"command option oa_excmask is non-zero when \
153			 oa_idmask is zero: %s : %s:%s %s\n"
154@ MSG_ERR_OPT_IDMASKPOW2 "command option oa_idmask must be 0 or power \
155			 of 2: %s : %s:%s %s\n"
156@ MSG_ERR_OPT_IDMASKUNIQ "command option oa_idmask must be 0 or must be unique \
157			 value: %s : %s:%s %s\n"
158@ MSG_ERR_ARG_MODPRE	"command argument name may not start with \
159			 a '-': %s : %s:%s %s\n"
160@ MSG_ERR_ARG_MODLEN	"command argument name must have at least one \
161			 character: %s : %s:%s %s\n"
162@ MSG_ERR_ARG_CMDOA_VAL	"command argument has ELFEDIT_CMDOA_F_VALUE set, \
163			 which is only allowed for command \
164			 options: %s : %s:%s %s\n"
165@ MSG_ERR_ARG_MASKNOT0	"command argument oa_idmask and oa_excmask fields \
166			 must both be set to 0: %s : %s:%s %s\n"
167@ MSG_ERR_BADSTDOA	"internal error: argument or option uses \
168			 ELFEDIT_CMDOA_F_VALUE incorrectly: %s : %s:%s\n"
169@ MSG_ERR_CMDOA_VALNAM	"ELFEDIT_CMDOA_F_VALUE optarg has NULL \
170			 oa_name: %s : %s:%s %s\n"
171@ MSG_ERR_CMDOA_VALNOT0	"ELFEDIT_CMDOA_F_VALUE optarg has non-0 oa_help, \
172			 oa_flags, oa_idmask or oa_excmask \
173			 field: %s : %s:%s %s\n"
174@ MSG_ERR_BADMODOPTVAL	"command option has ELFEDIT_CMDOA_F_VALUE bit set, \
175			 but following value item is missing: %s : %s:%s %s\n"
176@ MSG_ERR_CNTOPNFILE	"open failed: %s: %s\n"
177@ MSG_ERR_CNTOPNDIR	"unable to read directory: %s: %s\n"
178@ MSG_ERR_SIGACTION	"unable to set signal handler: %s\n"
179@ MSG_ERR_NOAR		"unable to edit ELF archive: %s\n"
180@ MSG_ERR_UNRECELFFILE	"unable to edit non-ELF file: %s\n"
181@ MSG_ERR_BADELFCLASS	"unable to edit file with unknown ELFCLASS: %s\n"
182@ MSG_ERR_MALLOC	"%s: malloc: %s\n"
183@ MSG_ERR_LIBELF	"%s: %s failed: %s\n"
184@ MSG_ERR_MODNOCMD	"module '%s' specified without a command\n"
185@ MSG_ERR_CNTFORK	"unable to execute child process: %s\n"
186@ MSG_ERR_CNTWAIT	"unable to wait for child process: %s\n"
187@ MSG_ERR_CNTEXEC	"%sunable to exec %s: %s\n"
188@ MSG_ERR_CNTSTAT	"unable to stat %s: %s\n"
189@ MSG_ERR_CNTCHMOD	"unable to chmod %s: %s\n"
190@ MSG_ERR_BADSECNDX	"Specified section index [%d] is outside valid \
191			 range: 1-%d\n"
192@ MSG_ERR_NOCAP		"ELF object does not have a capabilities section\n"
193@ MSG_ERR_NODYN		"ELF object does not have a dynamic section\n"
194@ MSG_ERR_NOSYM		"[%d: %s]: Symbol table does not contain symbol: %s\n"
195@ MSG_ERR_NOSYMTAB	"symbol table section not found\n"
196@ MSG_ERR_NOSYMINFO	"ELF object does not have a syminfo section\n"
197@ MSG_ERR_NOTSYMTAB	"[%d: %s]: section is not a symbol table\n"
198@ MSG_ERR_STRSHNDX	"string section index %d is outside expected \
199			 range 1 - %d\n"
200@ MSG_ERR_NOTSTRSH	"[%d: %s]: Section is not a string table as expected\n"
201@ MSG_ERR_NOSTRPAD	"[%d: %s]: String table does not have room to add \
202			 string\n"
203@ MSG_ERR_BADSTROFF	"[%d: %s]: String offset [%d] is outside valid \
204			 range: 0-%d\n"
205@ MSG_ERR_NOVERSYMSEC	"[%d: %s]: symbol table does not have an associated \
206			 versym section\n"
207@ MSG_ERR_NOXSHSEC	"[%d: %s]: symbol table does not have an associated \
208			 extended index section\n"
209@ MSG_ERR_BADATOISTR	"not a valid numeric value: '%s'\n"
210@ MSG_ERR_ATOIRANGE	"%s value is out of range [%lld - %lld]: %lld\n"
211@ MSG_ERR_ATOUIRANGE	"%s value is out of range [%llu - %llu]: %llu\n"
212@ MSG_ERR_BADPATHCODE	"Unrecognized code encountered in module \
213			 search path: %%%c\n"
214@ MSG_ERR_UNKNOWNSYSERR	"<unknown>"
215@ MSG_ERR_PAGERFINI	"Error encountered closing pager process\n"
216@ MSG_ERR_PRINTF	"Error encountered writing output\n"
217@ MSG_ERR_FWRITE	"Error encountered writing output: %s\n"
218@ MSG_ERR_MODNAMTOOLONG	"module name too long: %s\n"
219@ MSG_ERR_CNTGETORIGIN	"Unable to determine elfedit $ORIGIN\n"
220@ MSG_ERR_GLREAD	"error reading from stdin: %s\n"
221@ MSG_ERR_READONLY	"Operation not allowed in readonly session\n"
222@ MSG_ERR_NODIRTYQUIT	"Output ELF file has changes pending. Use 'write' \
223			 to save them, or 'quit -f' to exit without saving\n"
224@ MSG_ERR_NOSECNAM	"File does not contain section of name: %s\n"
225@ MSG_ERR_NOSECTYP	"File does not contain section of type: %s\n"
226@ MSG_ERR_ARRBNDS	"%s[%d]: attempt to access elements outside \
227			 of valid of range for this section: 0-%d\n"
228@ MSG_ERR_ARRMVOVERLAP	"%s: Array source [%d-%d] and destination \
229			 [%d-%d] regions overlap\n"
230@ MSG_ERR_BADOSABI	"Operation not supported by current OS ABI: %s\n";
231
232# Format strings for sys:help
233@ MSG_HLPFMT_MOD	"\nMODULE\n   %s - %s\n"
234@ MSG_HLPFMT_NAME	"\nNAME\n   %s - %s\n"
235@ MSG_HLPFMT_SYNOPSIS	"\nSYNOPSIS\n   %s\n"
236@ MSG_HLPFMT_ALIASES	"\nALIASES\n"
237@ MSG_HLPFMT_MODDEFCMD	"module default";
238@ MSG_HLPFMT_DEFCMD	"\t\t(Default Command For Module)";
239@ MSG_HLPFMT_DESC	"\nDESCRIPTION\n"
240@ MSG_HLPFMT_ARGS	"\nARGUMENTS\n"
241@ MSG_HLPFMT_OPT	"\nOPTIONS\n"
242@ MSG_HLPFMT_MULTIEND	"[End: %s, Next: %s]\n"
243@ MSG_HLPFMT_INFILE	"Input File:  %s\n"
244@ MSG_HLPFMT_INFILERO	"Input File:  %s (readonly)\n"
245@ MSG_HLPFMT_INFILENONE	"Input File: <not present>\n"
246@ MSG_HLPFMT_OUTFILE	"Output File: %s\n"
247@ MSG_HLPFMT_CNGPENDING	"    (changes pending)\n"
248@ MSG_HLPFMT_VARHDR	"\nOptions:\n"
249@ MSG_HLPFMT_AFLG	"    a (Autoprint):    %s\n"
250@ MSG_HLPFMT_DFLG	"    d (Debug):        %s\n"
251@ MSG_HLPFMT_OFLG	"    o (Output Style): %s\n"
252@ MSG_HLPFMT_PATHHDR	"\nModule Load Path:\n"
253@ MSG_HLPFMT_MODHDR	"\nCurrently Loaded Modules:\n"
254@ MSG_HLPFMT_SUMSYNOPSIS	"\n           %s\n"
255
256
257# Names we use when an ELF item lacks a name
258
259@ MSG_UNKNOWNSECNAM	"<unknown section name>"
260@ MSG_BADSYMOFFSETNAM	"<bad symbol name>"
261
262
263# builtin sys: module description
264
265@ MSG_MOD_SYS_DESC	"Built in elfedit commands"
266
267
268# 1-line description strings for builtin commands.
269
270@ MSG_SYS_DESC_HELP	"Display module information and/or command \
271			 documentation"
272@ MSG_SYS_DESC_LOAD	"Load module(s)"
273@ MSG_SYS_DESC_SET	"Set elfedit options"
274@ MSG_SYS_DESC_STATUS	"Session status (files, modules, options)"
275@ MSG_SYS_DESC_QUIT	"Exit elfedit session"
276@ MSG_SYS_DESC_UNLOAD	"Unload module(s)"
277@ MSG_SYS_DESC_WRITE	"Flush any changes back to current ELF file"
278
279
280# Command option description strings for builtin commands
281
282@ MSG_SYS_OPTDESC_HELP_S	"\
283   Generate a command synopsis rather than full command help.\n"
284
285@ MSG_SYS_OPTDESC_LOAD_A	"\
286   Load every module that can be found by following the module\n\
287   load path.\n"
288@ MSG_SYS_OPTDESC_QUIT_F	"\
289   Exit the elfedit session without first requiring changes to\n\
290   be saved. Any modifications made to the output file will be\n\
291   quietly discarded, and will be lost."
292@ MSG_SYS_OPTDESC_UNLOAD_A	"\
293   Unload every currently loaded module. Loaded modules can be\n\
294   displayed using the \"status\" command.\n"
295
296
297# Command option description strings for builtin commands
298
299@ MSG_ARGDESC_HELP_ARG		"\
300   Items for which help is desired. Module names and/or command\n\
301   names are allowed, as described above.\n"
302@ MSG_ARGDESC_LOAD_MODNAME	"Name(s) of modules to be loaded.\n"
303@ MSG_ARGDESC_SET_OPTION	"Name of option to be set.\n"
304@ MSG_ARGDESC_SET_VALUE		"Value to be set for option.\n"
305@ MSG_ARGDESC_UNLOAD_MODNAME	"Name(s) of modules to be loaded.\n"
306
307
308# Help text for builtin commands.
309
310@ MSG_SYS_HELP_HELP_NOARG	"   \
311   Welcome to elfedit, a utility for examining and editing\n\
312   ELF objects. This brief discussion will tell you the basics\n\
313   you need to know in order to use the elfedit help facility.\n\
314   With that, you will be able to find desired information about\n\
315   elfedit and its available commands.\n\
316   \n\
317   To reach the point where you are reading this text, you entered\n\
318   the elfedit command \"help\", without any arguments. Actually, you\n\
319   may have entered any of the following:\n\
320   \n\
321   \t?, help, man, sys:?, sys:help, sys:man\n\
322   \n\
323   As we will see below, these are simply different names for the\n\
324   help command.\n\
325   \n\
326   You use elfedit by issuing commands for it to execute.\n\
327   The syntax is similar to that used by Unix command line\n\
328   utilities, and follows the general form:\n\
329   \n\
330   \t> module:command [-opt]... arg...\n\
331   \n\
332   The '>' character is the elfedit prompt, and not part of the\n\
333   command. We show elfedit commands with the prompt, but you\n\
334   should not type the prompt in. elfedit supplies it to let\n\
335   you know when it is expecting a command to process.\n\
336   \n\
337   As with a Unix utility, there are options (which start with a '-'\n\
338   character) and plain arguments (which do not start with a '-').\n\
339   The plain arguments follow the options. The options and plain\n\
340   arguments differ from command to command. Each command sets its own\n\
341   rules for whether it accepts options and arguments, as well as\n\
342   which ones and how many. These details are found in the online\n\
343   help that is available for each command. To learn more about\n\
344   any command, use the help command:\n\
345   \n\
346   \t> help cmdname\n\
347   \n\
348   where 'cmdname' is the name of the command you are interested in.\n\
349   help is simply an elfedit command, like any other. As such, you\n\
350   can read the full documentation for help by entering the command:\n\
351   \n\
352   \t> help sys:help\n\
353   \n\
354   elfedit functionality is organized as \"modules\", which are\n\
355   dynamically loadable ELF objects that contain related editing\n\
356   commands. To refer to a command, you enter its module name,\n\
357   a colon (:), and the command name, all as a single unit without\n\
358   any intervening white-space. The 'sys' module is special: It is\n\
359   a built in module that contains the core commands required for\n\
360   elfedit to work. As a convenience, if you omit the module name\n\
361   from a command, elfedit assumes that you are referring to the sys\n\
362   module. This is why sys:help and help are really the same command,\n\
363   and why we did not have to write the above help command as:\n\
364   \n\
365   \t> sys:help sys:help\n\
366   \n\
367   In fact, we could have written it even more simply, as:\n\
368   \n\
369   \t> help help\n\
370   \n\
371   To access a command from any module other than sys, you must\n\
372   enter both the module and command names. This means that if\n\
373   you write your own module, the module name needs to be unique,\n\
374   but the command names it supplies can be the same names used by\n\
375   other modules. For instance, most elfedit modules supply a command\n\
376   named dump to display information about their part of the ELF \n\
377   file in a style similar to that used by the Unix elfdump command.\n\
378   Despite having the same name (dump), these are all distinct and\n\
379   separate commands. elfedit uses the module/command pair to know\n\
380   which one you mean.\n\
381   \n\
382   elfedit commands can sometimes have more than one name, or alias.\n\
383   Usually, each command only has one name, but there are some\n\
384   exceptions. For example, as we have already seen, sys:?, and \n\
385   sys:man are aliases of sys:help. These are all common names\n\
386   that different programs use to supply help. elfedit accepts all\n\
387   of these names in the hope that a new user who doesn't know\n\
388   elfedit yet will try one of them, and find this information.\n\
389   \n\
390   Most modules provide a \"default command\". This command will be\n\
391   run if you provide only the module name. Most modules use this\n\
392   feature to provide a shortcut for their \"dump\" command. For\n\
393   instance, both of the following commands run dyn:dump:\n\
394   \n\
395   \t> dyn:\n\
396   \t> dyn:dump\n\
397   \n\
398   Although the command name dump was not required, the colon\n\
399   (:) character is. Without it, elfedit will think you mean the\n\
400    command sys:dyn.\n\
401   \n\
402   Using the help command (sys:help), you can easily learn about\n\
403   the other commands that are available. To see which modules\n\
404   are available and a synopsis of the commands they provide:\n\
405   \n\
406   \t> help -s\n\
407   \n\
408   To see the full documentation for a command, you give the\n\
409   name of the command to the help command as a plain argument.\n\
410   As we saw above, this command will show you the detailed\n\
411   documentation for the help command itself:\n\
412   \n\
413   \t> help help\n\
414   \n\
415   The arguments to help can also be module names, without the\n\
416   command. In that case, output similar to that from the -s\n\
417   option will be displayed for that module.\n\
418   \n\
419   If you are new to elfedit, we recommend that you start by learning\n\
420   about the commands in the sys module. This will provide you with\n\
421   such basic knowledge as how to find out the status of your session\n\
422   (sys:status) or how to exit the elfedit program (sys:quit). Once\n\
423   you understand the basic commands, you can branch out and learn\n\
424   about the available modules and commands and how they can be used\n\
425   to edit ELF files.\n"
426
427
428
429
430@ MSG_SYS_HELP_HELP	"   \
431   The sys:help command provides information on elfedit modules\n\
432   and commands:\n\
433   \n\
434   o\tIf called with command names as arguments, documentation\n\
435   \tfor each given command is displayed. If the -s option is\n\
436   \tspecified, a basic synopsis for the command is given.\n\
437   \tOtherwise, the full documentation is shown.\n\
438   \n\
439   o\tIf called with module names as arguments, the name and\n\
440   \tpurpose of each module is shown, along with a brief synopsis\n\
441   \tof the commands the module provides.\n\
442   \n\
443   o\tIf called with the -s option, and no arguments, a brief\n\
444   \tsynopsis of every command is shown, organized by module,\n\
445   \tfor every module visible from the module load path.\n\
446   \n\
447   o\tIf called with no arguments, and the -s option is not\n\
448   \tused, a brief welcome message is displayed, giving basic\n\
449   \tinformation on elfedit operation and the use of the\n\
450   \thelp command.\n"
451
452@ MSG_SYS_HELP_LOAD	"\
453   The sys:load command is used to explicitly load elfedit modules.\n\
454   \n\
455   Most of the functionality available in elfedit is not built\n\
456   into the elfedit program directly. Instead, functionality\n\
457   is contained in \"modules\", which are implemented as dynamically\n\
458   loadable ELF sharable objects. This design allows for easy\n\
459   extensibility of elfedit's abilities, and it is also efficient,\n\
460   since it allows elfedit to be a relatively small program.\n\
461   \n\
462   elfedit will automatically load a module under the following\n\
463   circumstances:\n\
464   \n   \
465   o\tA command from the module needs to be run.\n\
466   \n   \
467   o\tTo display help information about the module or a command\n\
468   \tfound in the module.\n\
469   \n   \
470   o\tTo perform command completion in an interactive session.\n\
471   \tCommand completion can cause many, or all modules visible\n\
472   \tin the module path to be loaded.\n\
473   \n\
474   There is usually little need for explicit module loading.\n\
475   It is usually best to allow elfedit to load modules as they\n\
476   are needed.\n"
477
478@ MSG_SYS_HELP_SET	"\
479   Set options that control how elfedit works.\n\
480   \n\
481   Most variables accept boolen (true/false) values. The sys:set\n\
482   command accepts any of the following as a boolean value:\n\
483   0/1, true/false, t/f, yes/no, y/n, on/off.\n\
484   \n\
485   The variables, and their allowed values, are as follows:\n\
486   \n\
487   a\tAutoprint [boolean]\n\
488   \tWhen autoprint is active, elfedit automatically displays\n\
489   \tthe results of any edits after carrying them out. By default,\n\
490   \tautoprint is on for interactive sessions, and false for\n\
491   \tsessions where the input is not a tty. The elfedit -a option\n\
492   \tcan be used to enable autoprint at session start.\n\
493   \n\
494   d\tDebug [boolean]\n\
495   \tWhen enabled, elfedit issues detailed messages showing\n\
496   \twhere ELF data is being accessed, and how specific edits\n\
497   \tare being carried out. Debug mode is off by default. The\n\
498   \telfedit -d option can be used to enable debug mode at\n\
499   \tsession start.\n\
500   \n\
501   o\tOutput Style [default, simple, num]\n\
502   \tControls the format in which elfedit prints ELF data:\n\
503   \n\
504   \tdefault\n\
505   \tInformation is displayed in a style similar to that used by\n\
506   \tthe elfdump utility. This style is best for interactive use.\n\
507   \n\
508   \tsimple\n\
509   \tData is displayed in a simple format, without extraneous\n\
510   \tinformation or formatting. Strings are displayed as is.\n\
511   \tNumbers are displayed as symbolic constants when possible,\n\
512   \tand in integer form otherwise.\n\
513   \n\
514   \tnum\n\
515   \tInteger values are always shown in integer form. Strings\n\
516   \tare shown as the integer offset into the containing string\n\
517   \ttable.\n"
518
519@ MSG_SYS_HELP_STATUS	"\
520   The status of the current elfedit session is shown:\n\
521   \n\
522   o\tInput and output files\n\
523   \n\
524   o\tCurrent settings of the elfedit options (See 'help set'\n\
525   \tfor more information on elfedit options)\n\
526   \n\
527   o\tModule load path\n\
528   \n\
529   o\tLoaded modules and the paths of the sharable objects\n\
530   \tthat provide them\n"
531
532@ MSG_SYS_HELP_QUIT	"\
533   Exits the elfedit session.\n\
534   \n\
535   elfedit will normally refuse to exit a non-readonly session\n\
536   while there are unsaved edits pending. The sys:write command\n\
537   can be used to save such edits, or the -f option can be used to\n\
538   discard pending edits and exit immediately.\n"
539
540@ MSG_SYS_HELP_UNLOAD	"\
541   The sys:unload command is used to explicitly unload elfedit modules.\n\
542   \n\
543   There is usually little need to explicitly unload modules.\n\
544   \n\
545   The description of the sys:load command discusses module loading\n\
546   in more detail.\n"
547
548@ MSG_SYS_HELP_WRITE	"\
549   Writes all pending edits to the output file. Until this is done,\n\
550   the edits are not permanent, and can be abandoned by exiting the\n\
551   session using the -f option to sys:quit. Once sys:write is used,\n\
552   these changes become permanent.\n"
553
554
555
556# Command option description strings for inheritable option strings
557
558@ MSG_STDOA_OPTDESC_AND	"\
559   The new value should be bitwised AND'd against the\n\
560   existing value.\n"
561
562@ MSG_STDOA_OPTDESC_CMP	"\
563   The new value should be bitwise complemented\n\
564   (1 values set to 0, and 0 values set to 1) before being\n\
565   applied to the existing value.\n"
566
567@ MSG_STDOA_OPTDESC_O "\
568   Overrides the global output style (as set via the sys:set\n\
569   command) for the duration of the call to this command.\n\
570   The valid values for the outstyle argument are: default,\n\
571   simple, or num.\n\
572   \n\
573   Output styles are described in more detail in the documentation\n\
574   for the sys:set command.\n"
575
576@ MSG_STDOA_OPTDESC_OR	"\
577   The new value should be bitwised OR'd against the\n\
578   existing value.\n"
579
580
581
582
583@ _END_
584
585
586# The following strings represent reserved words, files, pathnames and symbols.
587# Reference to this strings is via the MSG_ORIG() macro, and thus no message
588# translation is required.
589
590# Names of libelf functions
591
592@ MSG_ELF_BEGIN		"elf_begin"
593@ MSG_ELF_GETEHDR	"elf_getehdr"
594@ MSG_ELF_GETDATA	"elf_getdata"
595@ MSG_ELF_GETPHNUM	"elf_getphnum"
596@ MSG_ELF_GETPHDR	"elf_getphdr"
597@ MSG_ELF_GETSCN	"elf_getscn"
598@ MSG_ELF_GETSHDR	"elf_getshdr"
599@ MSG_ELF_GETSHNUM	"elf_getshnum"
600@ MSG_ELF_GETSHSTRNDX	"elf_getshstrndx"
601@ MSG_ELF_UPDATE	"elf_update"
602
603
604# Names of sh_type SHT_* type constants
605
606@ MSG_SHT_SYMTAB		"SHT_SYMTAB"		# 2
607@ MSG_SHT_SYMTAB_ALT1		"symtab"
608@ MSG_SHT_STRTAB		"SHT_STRTAB"		# 3
609@ MSG_SHT_STRTAB_ALT1		"strtab"
610@ MSG_SHT_DYNSYM		"SHT_DYNSYM"		# 11
611@ MSG_SHT_DYNSYM_ALT1		"dynsym"
612@ MSG_SHT_SUNW_LDYNSYM		"SHT_SUNW_LDYNSYM"	# 0x6ffffff3
613@ MSG_SHT_SUNW_LDYNSYM_ALT1	"sunw_ldynsym"
614
615
616# ISA strings. These could be separated into separate message modules
617# on a per-platform basis if their size became large, but this is probably
618# cheaper for this small set of strings.
619@ MSG_ISA_SPARC_32	"sparc"
620@ MSG_ISA_SPARC_64	"sparcv9"
621@ MSG_ISA_X86_32	"i386"
622@ MSG_ISA_X86_64	"amd64"
623
624# Format strings
625
626@ MSG_FMT_BLDPATH	"%s/%s"
627@ MSG_FMT_BLDSOPATH	"%s/%s.so"
628@ MSG_FMT_MODCMD	"%s:%s"
629@ MSG_FMT_SYSCMD	"[sys]:%s"
630@ MSG_FMT_WORDVAL	"%u"
631@ MSG_FMT_WRAPUSAGE	"\n%s"
632@ MSG_FMT_SECMSGPRE	"[%d: %s]"
633
634# Miscellaneous clutter
635
636@ MSG_STR_NULL		""
637@ MSG_STR_ARG		"arg"
638@ MSG_STR_SP_BAR_SP	" | "
639@ MSG_STR_ELIPSES	"..."
640@ MSG_STR_OPTIONS	"ade:L:o:rw"
641@ MSG_STR_ELFEDIT	"elfedit: "
642@ MSG_STR_PROMPT	"> "
643@ MSG_STR_NL		"\n"
644@ MSG_STR_TAB		"\t"
645@ MSG_STR_BINCP		"/bin/cp"
646@ MSG_STR_BINMORE	"/bin/more"
647@ MSG_STR_PAGER		"PAGER"
648@ MSG_STR_ELFEDITINIT32	"elfedit32_init"
649@ MSG_STR_ELFEDITINIT64	"elfedit64_init"
650@ MSG_STR_HLPINDENT	"   ";
651@ MSG_STR_HLPUSEINDENT	"        ";
652@ MSG_STR_HLPSUMINDENT	"              ";
653@ MSG_STR_HLPOPTARG	"%s";
654@ MSG_STR_HLPOPTARG2	"%s %s";
655@ MSG_STR_ENVVAR	"ELFEDIT_PATH"
656@ MSG_STR_MODPATH	"%r/usr/lib/elfedit/%I"
657@ MSG_STR_EMPTY		""
658@ MSG_STR_DOT		"."
659@ MSG_STR_COLON		":"
660@ MSG_STR_SPACE		" "
661@ MSG_STR_COMMA_SP	", "
662@ MSG_STR_CPAREN	")"
663@ MSG_STR_DOTSO		".so"
664@ MSG_STR_MINUS_MINUS	"--"
665@ MSG_STR_MINUS_A	"-a"
666@ MSG_STR_MINUS_AND	"-and"
667@ MSG_STR_MINUS_CMP	"-cmp"
668@ MSG_STR_MINUS_F	"-f"
669@ MSG_STR_MINUS_S	"-s"
670@ MSG_STR_MINUS_O	"-o"
671@ MSG_STR_MINUS_OR	"-or"
672@ MSG_STR_MODNAME	"modname"
673@ MSG_STR_TRUE		"true"
674@ MSG_STR_FALSE		"false"
675@ MSG_STR_ON		"on"
676@ MSG_STR_OFF		"off"
677@ MSG_STR_YES		"yes"
678@ MSG_STR_NO		"no"
679@ MSG_STR_0		"0"
680@ MSG_STR_1		"1"
681@ MSG_STR_A		"a"
682@ MSG_STR_D		"d"
683@ MSG_STR_F		"f"
684@ MSG_STR_N		"n"
685@ MSG_STR_O		"o"
686@ MSG_STR_OPTION	"option"
687@ MSG_STR_T		"t"
688@ MSG_STR_VALUE		"value"
689@ MSG_STR_W		"w"
690@ MSG_STR_Y		"y"
691@ MSG_STR_DEFAULT		"default"
692@ MSG_STR_MINUS_O_DEFAULT	"-odefault"
693@ MSG_STR_SIMPLE		"simple"
694@ MSG_STR_MINUS_O_SIMPLE	"-osimple"
695@ MSG_STR_NUM			"num"
696@ MSG_STR_MINUS_O_NUM		"-onum"
697@ MSG_STR_OUTSTYLE	"outstyle"
698
699
700# Format strings for sys:help
701@ MSG_HLPFMT_MULTIHDR	"::::::::::::::\n%s\n::::::::::::::\n"
702@ MSG_HLPFMT_NAMDSCCOL	"   %-15s%s\n"
703@ MSG_HLPFMT_NAMDSCHDR	"%s - %s\n"
704@ MSG_HLPFMT_NAMSUMHDR	"      %s - %s\n"
705@ MSG_HLPFMT_PATHELT	"       %s\n"
706@ MSG_HLPFMT_MULTNAM	"%s ("
707
708# name of builtin sys: module
709
710@ MSG_MOD_SYS		"sys"
711
712# Names of sys: builtin commands
713@ MSG_SYS_CMD_HELP	"help"
714@ MSG_SYS_CMD_HELP_A1	"?"
715@ MSG_SYS_CMD_HELP_A2	"man"
716@ MSG_SYS_CMD_LOAD	"load"
717@ MSG_SYS_CMD_QUIT	"quit"
718@ MSG_SYS_CMD_QUIT_A1	"exit"
719@ MSG_SYS_CMD_QUIT_A2	"bye"
720@ MSG_SYS_CMD_SET	"set"
721@ MSG_SYS_CMD_STATUS	"status"
722@ MSG_SYS_CMD_UNLOAD	"unload"
723@ MSG_SYS_CMD_WRITE	"write"
724@ MSG_SYS_CMD_WRITE_A1	"flush"
725@ MSG_SYS_CMD_WRITE_A2	"save"
726