elfdump.msg revision 2647:e440e3da2a6f
190792Sgshapiro#
2261363Sgshapiro# CDDL HEADER START
390792Sgshapiro#
490792Sgshapiro# The contents of this file are subject to the terms of the
590792Sgshapiro# Common Development and Distribution License (the "License").
690792Sgshapiro# You may not use this file except in compliance with the License.
790792Sgshapiro#
890792Sgshapiro# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9266692Sgshapiro# or http://www.opensolaris.org/os/licensing.
1090792Sgshapiro# See the License for the specific language governing permissions
1190792Sgshapiro# and limitations under the License.
1290792Sgshapiro#
1390792Sgshapiro# When distributing Covered Code, include this CDDL HEADER in each
1490792Sgshapiro# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1590792Sgshapiro# If applicable, add the following below this CDDL HEADER, with the
1690792Sgshapiro# fields enclosed by brackets "[]" replaced with your own identifying
1790792Sgshapiro# information: Portions Copyright [yyyy] [name of copyright owner]
1890792Sgshapiro#
1990792Sgshapiro# CDDL HEADER END
2090792Sgshapiro#
2190792Sgshapiro
2290792Sgshapiro#
2390792Sgshapiro# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2490792Sgshapiro# Use is subject to license terms.
2590792Sgshapiro#
2690792Sgshapiro# ident	"%Z%%M%	%I%	%E% SMI"
2790792Sgshapiro#
2890792Sgshapiro
2990792Sgshapiro@ _START_
3090792Sgshapiro
3190792Sgshapiro# Message file for cmd/sgs/elfdump.
3290792Sgshapiro
3390792Sgshapiro@ MSG_ID_ELFDUMP
3490792Sgshapiro
3590792Sgshapiro# Usage Messages
3690792Sgshapiro
3790792Sgshapiro@ MSG_USAGE_BRIEF	"usage: %s [-cCdegGhHiklmnprsuvy] [-N name] \
3890792Sgshapiro			 [-w file] file(s)\n"
3990792Sgshapiro@ MSG_USAGE_DETAIL1	"\t[-c]\t\tdump section header information\n"
4090792Sgshapiro@ MSG_USAGE_DETAIL2	"\t[-C]\t\tdemangle C++ symbol names\n"
4190792Sgshapiro@ MSG_USAGE_DETAIL3	"\t[-d]\t\tdump the contents of the .dynamic section\n"
4290792Sgshapiro@ MSG_USAGE_DETAIL4	"\t[-e]\t\tdump the elf header\n"
4390792Sgshapiro@ MSG_USAGE_DETAIL5	"\t[-g]\t\tdump the contents of the .group sections\n"
4490792Sgshapiro@ MSG_USAGE_DETAIL6	"\t[-G]\t\tdump the contents of the .got section\n"
4590792Sgshapiro@ MSG_USAGE_DETAIL7	"\t[-h]\t\tdump the contents of the .hash section\n"
4690792Sgshapiro@ MSG_USAGE_DETAIL8	"\t[-H]\t\tdump the contents of the .SUNW_hwcap \
4790792Sgshapiro			 section\n"
4890792Sgshapiro@ MSG_USAGE_DETAIL9	"\t[-i]\t\tdump the contents of the .interp section\n"
4990792Sgshapiro@ MSG_USAGE_DETAIL9_1	"\t[-l]\t\tdump with no truncated section names\n"
5090792Sgshapiro@ MSG_USAGE_DETAIL10	"\t[-k]\t\tcalculate elf checksum\n"
5190792Sgshapiro@ MSG_USAGE_DETAIL11	"\t[-m]\t\tdump the contents of the .SUNW_move \
5290792Sgshapiro			 section\n"
5390792Sgshapiro@ MSG_USAGE_DETAIL12	"\t[-n]\t\tdump the contents of the .note section\n"
5490792Sgshapiro@ MSG_USAGE_DETAIL13	"\t[-N name]\tqualify an option with a `name'\n"
5590792Sgshapiro@ MSG_USAGE_DETAIL14	"\t[-p]\t\tdump the program headers\n"
5690792Sgshapiro@ MSG_USAGE_DETAIL15	"\t[-r]\t\tdump the contents of the relocation \
5790792Sgshapiro			 sections\n"
5890792Sgshapiro@ MSG_USAGE_DETAIL16	"\t[-s]\t\tdump the contents of the symbol table \
5990792Sgshapiro			 sections\n"
6090792Sgshapiro@ MSG_USAGE_DETAIL17	"\t[-u]\t\tdump the contents of a frame unwind \
6190792Sgshapiro			 section\n"
6290792Sgshapiro@ MSG_USAGE_DETAIL18	"\t[-v]\t\tdump the contents of the version sections\n"
6390792Sgshapiro@ MSG_USAGE_DETAIL19	"\t[-w file]\twrite the contents of specified section \
6490792Sgshapiro			 to `file'\n"
6590792Sgshapiro@ MSG_USAGE_DETAIL20	"\t[-y]\t\tdump the contents of the .SUNW_syminfo \
6690792Sgshapiro			 section\n"
6790792Sgshapiro
6890792Sgshapiro# Errors
6990792Sgshapiro
7090792Sgshapiro@ MSG_ERR_BADFILE	"%s: invalid file type\n"
7190792Sgshapiro@ MSG_ERR_BADREL1       "%s: bad relocation entry: %s: relocation requires symbol\n"
7290792Sgshapiro@ MSG_ERR_SHSTRNULL	"%s: zero size section header string table (shstrtab)\n"
7390792Sgshapiro@ MSG_ERR_FAILURE	"%s: %s failed: %s\n"
7490792Sgshapiro@ MSG_ERR_BADSHNAME	"%s: %s: invalid sh_name: %lld\n"
7590792Sgshapiro@ MSG_ERR_BADSHLINK	"%s: %s: invalid sh_link: %d\n"
7690792Sgshapiro@ MSG_ERR_BADSHINFO	"%s: %s: invalid sh_info: %d\n"
7790792Sgshapiro@ MSG_ERR_BADSHTYPE	"%s: %s: invalid sh_type: %d\n"
7890792Sgshapiro@ MSG_ERR_BADALIGN	"%s: %s: bad sh_offset alignment\n"
7990792Sgshapiro@ MSG_ERR_BADSYM2	"%s: %s: bad symbol entry: %s: must be SHN_COMMON or \
8090792Sgshapiro			 defined in SHT_NOBITS section\n"
8190792Sgshapiro@ MSG_ERR_BADSYM3	"%s: %s: bad symbol entry: %s: must be defined in \
8290792Sgshapiro			 a SHF_TLS section\n"
8390792Sgshapiro@ MSG_ERR_BADSYM4	"%s: %s: bad symbol entry: %s: must be defined in \
8490792Sgshapiro			 a non-SHF_TLS section\n"
8590792Sgshapiro@ MSG_ERR_BADSYM5	"%s: %s: bad symbol entry: %s: invalid shndx: %d\n"
8690792Sgshapiro@ MSG_ERR_BADSYM6	"%s: %s: bad symbol entry: %s: section[%d] size: %lld: \
8790792Sgshapiro			 is smaller than symbol size: %lld\n"
8890792Sgshapiro
8990792Sgshapiro@ MSG_ERR_RELBADSYMNDX	"%s: bad symbol reference %d: from relocation \
9090792Sgshapiro			 entry: %d\n"
9190792Sgshapiro@ MSG_ERR_HSBADSYMNDX	"%s: bad symbol reference %d: from hash entry: %d\n"
9290792Sgshapiro@ MSG_ERR_BADSYMXINDEX1	"%s: %s: index[%d]: invalid SHN_XINDEX reference: \
9390792Sgshapiro			 SHT_SYMTAB_SHNDX section truncated: no entry for this \
9490792Sgshapiro			 symbol\n"
9590792Sgshapiro@ MSG_ERR_BADSYMXINDEX2	"%s: %s: index[%d]: invalid SHN_XINDEX reference: \
9690792Sgshapiro			 bad SHT_SYMTAB_SHNDX entry: invalid shndx: 0x%x\n"
9790792Sgshapiro@ MSG_ERR_BADSYMXINDEX3	"%s: %s: index[%d]: invalid SHN_XINDEX reference: \
9890792Sgshapiro			 SHT_SYMTAB_SHNDX section not found\n"
9990792Sgshapiro
10090792Sgshapiro@ MSG_ERR_BADSTOFF	"%s: %s: index[%d]: bad %s offset: 0x%x: max 0x%x\n"
10190792Sgshapiro@ MSG_ERR_BADSZ		"%s: %s: zero size or zero entry size information\n"
10290792Sgshapiro@ MSG_ERR_BADMINFO	"%s: %s: invalid m_info: 0x%llx\n"
10390792Sgshapiro@ MSG_ERR_BADHASH	"%s: %s: bad hash entry: symbol %s: exists in bucket \
10490792Sgshapiro			 %d, should be bucket %ld\n"
10590792Sgshapiro
10690792Sgshapiro@ MSG_WARN_INVINTERP1	"%s: PT_INTERP header has no associated section\n"
10790792Sgshapiro@ MSG_WARN_INVINTERP2	"%s: interp section: %s: and PT_INTERP program \
10890792Sgshapiro			 header have conflicting size or offsets\n"
10990792Sgshapiro@ MSG_WARN_INVCAP1	"%s: PT_SUNWCAP header has no associated section\n"
11090792Sgshapiro@ MSG_WARN_INVCAP2	"%s: capabilities section: %s: requires PT_CAP program \
11190792Sgshapiro			 header\n"
11290792Sgshapiro@ MSG_WARN_INVCAP3	"%s: capabilities section: %s: and PT_CAP program \
11390792Sgshapiro			 header have conflicting size or offsets\n"
114
115# Elf Output Messages
116
117@ MSG_ELF_SHDR		"Section Header[%d]:  sh_name: %s"
118@ MSG_ELF_PHDR		"Program Header[%d]:"
119
120@ MSG_ELF_SCN_CAP	"Hardware/Software Capabilities Section:  %s"
121@ MSG_ELF_SCN_INTERP	"Interpreter Section:  %s"
122@ MSG_ELF_SCN_VERDEF	"Version Definition Section:  %s"
123@ MSG_ELF_SCN_VERNEED	"Version Needed Section:  %s"
124@ MSG_ELF_SCN_SYMTAB	"Symbol Table Section:  %s"
125@ MSG_ELF_SCN_RELOC	"Relocation Section:  %s"
126@ MSG_ELF_SCN_UNWIND	"Unwind Section: %s"
127@ MSG_ELF_SCN_DYNAMIC	"Dynamic Section:  %s"
128@ MSG_ELF_SCN_NOTE	"Note Section:  %s"
129@ MSG_ELF_SCN_HASH	"Hash Section:  %s"
130@ MSG_ELF_SCN_SYMINFO	"Syminfo Section:  %s"
131@ MSG_ELF_SCN_GOT	"Global Offset Table Section:  %s"
132@ MSG_ELF_SCN_GRP	"Group Section:  %s"
133@ MSG_ELF_SCN_MOVE	"Move Section:  %s"
134
135@ MSG_ELF_HASH_BKTS1	"%10.10s  buckets contain %8d symbols"
136@ MSG_ELF_HASH_BKTS2	"%10.10s  buckets         %8d symbols (globals)"
137@ MSG_ELF_HASH_INFO	"    bucket  symndx      name"
138@ MSG_HASH_OVERFLW	"%s: warning: section %s: too many symbols to count, \
139			 bucket=%d count=%d"
140@ MSG_ELF_ERR_SHDR	"\tunable to obtain section header: shstrtab[%lld]\n"
141@ MSG_ELF_ERR_DATA	"\tunable to obtain section data: shstrtab[%lld]\n"
142@ MSG_ELF_ERR_SCN	"\tunable to obtain section header: section[%d]\n"
143@ MSG_ELF_ERR_SCNDATA	"\tunable to obtain section data: section[%d]\n"
144@ MSG_ARCHIVE_SYMTAB	"\nSymbol Table: (archive)"
145@ MSG_ARCHIVE_FIELDS	"     index    offset    member name and symbol"
146
147@ MSG_GOT_MULTIPLE	"%s: multiple relocations against \
148			 the same GOT entry ndx: %d addr: 0x%llx\n"
149@ MSG_GOT_UNEXPECTED	"%s: warning: section %s: section unexpected within \
150			 relocatable object\n"
151
152# Miscellaneous clutter
153
154@ MSG_STR_NULL		"(null)"
155@ MSG_STR_DEPRECATED	"(deprecated value)"
156@ MSG_STR_UNKNOWN	"<unknown>"
157@ MSG_STR_SECTION	"%.12s (section)"
158@ MSG_STR_L_SECTION	"%s (section)"
159@ MSG_STR_CHECKSUM	"elf checksum: 0x%lx"
160
161@ MSG_FMT_SCNNDX	"section[%d]"
162
163@ MSG_ERR_MALLOC	"%s: malloc: %s\n"
164@ MSG_ERR_OPEN		"%s: open: %s\n"
165
166#
167# SHT_MOVE messages
168#
169@ MSG_MOVE_TITLE	"    symndx offset   size repeat stride   \
170			 value               with respect to"
171@ MSG_MOVE_ENTRY	"%10.10s %6lld %6d %6d %6d %#18.18llx  %s"
172
173#
174# SHT_GROUP messages
175#
176@ MSG_GRP_TITLE		"     index    flags / section         signature symbol"
177@ MSG_GRP_SIGNATURE	"       [0]   %-24s %s"
178@ MSG_GRP_INVALSCN	"<invalid section>"
179
180#
181# SHT_NOTE messages
182#
183@ MSG_NOTE_BADDATASZ	"%s: %s: note header exceeds section size. \
184			 offset: 0x%x\n"
185@ MSG_NOTE_BADNMSZ	"%s: %s: note name value exceeds section size. \
186			 offset: 0x%x namesize: 0x%x\n"
187@ MSG_NOTE_BADDESZ	"%s: %s: note data size exceeds section size. \
188			 offset: 0x%x datasize: 0x%x\n"
189
190@ _END_
191
192# The following strings represent reserved words, files, pathnames and symbols.
193# Reference to this strings is via the MSG_ORIG() macro, and thus no message
194# translation is required.
195
196@ MSG_STR_OSQBRKT	"["
197@ MSG_STR_CSQBRKT	"]"
198
199@ MSG_GRP_COMDAT	" COMDAT "
200@ MSG_GRP_ENTRY		"%10.10s   %s [%lld]\n"
201@ MSG_GRP_UNKNOWN	" 0x%x "
202
203@ MSG_ELF_GOT		".got"
204
205@ MSG_ELF_GETEHDR	"elf_getehdr"
206@ MSG_ELF_GETPHDR	"elf_getphdr"
207@ MSG_ELF_GETSHDR	"elf_getshdr"
208@ MSG_ELF_GETSCN	"elf_getscn"
209@ MSG_ELF_GETDATA	"elf_getdata"
210@ MSG_ELF_GETARHDR	"elf_getarhdr"
211@ MSG_ELF_GETARSYM	"elf_getarsym"
212@ MSG_ELF_RAND		"elf_rand"
213@ MSG_ELF_BEGIN		"elf_begin"
214@ MSG_ELF_GETPHNUM	"elf_getphnum"
215@ MSG_ELF_GETSHNUM	"elf_getshnum"
216@ MSG_ELF_GETSHSTRNDX	"elf_getshstrndx"
217@ MSG_ELF_ARSYM		"ARSYM"
218
219@ MSG_GOT_SYM		"_GLOBAL_OFFSET_TABLE_"
220
221@ MSG_STR_OPTIONS	"CcdeGgHhiklmN:nprsuvw:y"
222
223@ MSG_STR_EMPTY		""
224
225@ MSG_FMT_INDENT	"	%s"
226@ MSG_FMT_INDEX		" [%lld]"
227@ MSG_FMT_INDEX2	"[%d]"
228@ MSG_FMT_INTEGER	" %d"
229@ MSG_FMT_HASH_INFO	"%10.10s  %-10s  %s"
230@ MSG_FMT_ARSYM1	"%10.10s  0x%8.8x  (%s):%s"
231@ MSG_FMT_ARSYM2	"%10.10s  0x%8.8x"
232@ MSG_FMT_ARNAME	"%s(%s)"
233@ MSG_FMT_NLSTR		"\n%s:"
234@ MSG_FMT_NLSTRNL	"\n%s:\n"
235
236@ MSG_SUNW_OST_SGS	"SUNW_OST_SGS"
237
238# Unwind info
239
240@ MSG_SCN_FRM		".eh_frame"
241@ MSG_SCN_FRMHDR	".eh_frame_hdr"
242
243@ MSG_UNW_FRMHDR	"Frame Header:"
244@ MSG_UNW_FRMVERS	"  Version: %d"
245@ MSG_UNW_FRPTRENC	"  FramePtrEnc: %-20s  FramePtr: 0x%llx"
246@ MSG_UNW_FDCNENC	"  FdeCntEnc:   %-20s  FdeCnt: %lld"
247@ MSG_UNW_TABENC	"  TableEnc:    %-20s"
248@ MSG_UNW_BINSRTAB1	"  Binary Search Table:"
249@ MSG_UNW_BINSRTAB2	"      InitialLoc          FdeLoc"
250@ MSG_UNW_BINSRTABENT	"    0x%016llx  0x%016llx"
251@ MSG_UNW_CIE		"CIE: [0x%08llx]"
252@ MSG_UNW_CIELNGTH	" length: 0x%02x cieid: %d"
253@ MSG_UNW_CIEVERS	" version: %d  augstring: `%s'"
254@ MSG_UNW_CIECALGN	" codealign: 0x%llx  dataalign: %lld  \
255			  retaddr: %d"
256@ MSG_UNW_CIEAUXVAL	" Auxiliary vals:"
257@ MSG_UNW_CIEAUXSIZE	"   size: %d"
258@ MSG_UNW_CIEAUXPERS	"   pers: 0x%02x %s 0x%08llx"
259@ MSG_UNW_CIEAUXCENC	"   cenc: 0x%02x %s"
260@ MSG_UNW_CIEAUXLSDA	"   lsda: 0x%02x %s"
261@ MSG_UNW_CIEAUXUNEC	"   Unexpected aug val: %c"
262@ MSG_UNW_CIECFI	" CallFrameInstructions:"
263@ MSG_UNW_CIEPRE	"   "
264
265@ MSG_UNW_FDE		" FDE: [0x%08llx]"
266@ MSG_UNW_FDELNGTH	"    length: 0x%02x  cieptr: 0x%02x"
267@ MSG_UNW_FDEINITLOC	"    initloc: 0x%08llx  addrrange: 0x%04llx"
268@ MSG_UNW_FDEAUXVAL	"   Auxiliary vals:"
269@ MSG_UNW_FDEAUXSIZE	"      size: 0x%llx"
270@ MSG_UNW_FDEAUXLSDA	"    lsda: 0x%llx"
271@ MSG_UNW_FDECFI	"    CallFrameInstructions:"
272@ MSG_UNW_FDEPRE	"      "
273
274@ MSG_UNW_TBLENTRY	"0x%02x "
275
276# Note messages
277
278@ MSG_NOTE_TYPE		"    type   %#x"
279@ MSG_NOTE_NAMESZ	"    namesz %#x:"
280@ MSG_NOTE_DESCSZ	"    descsz %#x:"
281@ MSG_NOTE_DESC		"      desc[%d]\t%s"
282@ MSG_NOTE_TOK		"%2.2x "
283