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