xref: /titanic_53/usr/src/uts/common/krtld/reloc.h (revision c13de8f6a88563211bd4432ca11ca38ed3bf0fc0)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
55aefb655Srie  * Common Development and Distribution License (the "License").
65aefb655Srie  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
21552ff457Srie 
227c478bd9Sstevel@tonic-gate /*
23141040e8Srie  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
257c478bd9Sstevel@tonic-gate  */
267c478bd9Sstevel@tonic-gate 
277c478bd9Sstevel@tonic-gate #ifndef	_RELOC_DOT_H
287c478bd9Sstevel@tonic-gate #define	_RELOC_DOT_H
297c478bd9Sstevel@tonic-gate 
307c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
317c478bd9Sstevel@tonic-gate 
327c478bd9Sstevel@tonic-gate #if defined(_KERNEL)
337c478bd9Sstevel@tonic-gate #include <sys/machelf.h>
347c478bd9Sstevel@tonic-gate #include <sys/bootconf.h>
357c478bd9Sstevel@tonic-gate #include <sys/kobj.h>
367c478bd9Sstevel@tonic-gate #include <sys/kobj_impl.h>
377c478bd9Sstevel@tonic-gate #else
387c478bd9Sstevel@tonic-gate #include <machdep.h>
395aefb655Srie #include <rtld.h>
40552ff457Srie #include <conv.h>
417c478bd9Sstevel@tonic-gate #endif /* _KERNEL */
427c478bd9Sstevel@tonic-gate 
437c478bd9Sstevel@tonic-gate #include <relmach.h>
447c478bd9Sstevel@tonic-gate 
457c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
467c478bd9Sstevel@tonic-gate extern "C" {
477c478bd9Sstevel@tonic-gate #endif
487c478bd9Sstevel@tonic-gate 
497c478bd9Sstevel@tonic-gate /*
507c478bd9Sstevel@tonic-gate  * Global include file for relocation common code.
517c478bd9Sstevel@tonic-gate  *
527c478bd9Sstevel@tonic-gate  * Flags for reloc_entry->re_flags
537c478bd9Sstevel@tonic-gate  */
547c478bd9Sstevel@tonic-gate #define	FLG_RE_NOTREL		0x00000000
557c478bd9Sstevel@tonic-gate #define	FLG_RE_GOTADD		0x00000001	/* create a GOT entry */
567c478bd9Sstevel@tonic-gate #define	FLG_RE_GOTREL		0x00000002	/* GOT based */
577c478bd9Sstevel@tonic-gate #define	FLG_RE_GOTPC		0x00000004	/* GOT - P */
587c478bd9Sstevel@tonic-gate #define	FLG_RE_GOTOPINS		0x00000008	/* GOTOP instruction */
597c478bd9Sstevel@tonic-gate #define	FLG_RE_PCREL		0x00000010
607c478bd9Sstevel@tonic-gate #define	FLG_RE_PLTREL		0x00000020
617c478bd9Sstevel@tonic-gate #define	FLG_RE_VERIFY		0x00000040	/* verify value fits */
627c478bd9Sstevel@tonic-gate #define	FLG_RE_UNALIGN		0x00000080	/* offset is not aligned */
637c478bd9Sstevel@tonic-gate #define	FLG_RE_WDISP16		0x00000100	/* funky sparc DISP16 rel */
647c478bd9Sstevel@tonic-gate #define	FLG_RE_SIGN		0x00000200	/* value is signed */
657c478bd9Sstevel@tonic-gate #define	FLG_RE_ADDRELATIVE	0x00000400	/* RELATIVE relocation */
667c478bd9Sstevel@tonic-gate 						/* required for non-fixed */
677c478bd9Sstevel@tonic-gate 						/* objects */
687c478bd9Sstevel@tonic-gate #define	FLG_RE_EXTOFFSET	0x00000800	/* extra offset required */
697c478bd9Sstevel@tonic-gate #define	FLG_RE_REGISTER		0x00001000	/* relocation initializes */
707c478bd9Sstevel@tonic-gate 						/*    a REGISTER by OLO10 */
717c478bd9Sstevel@tonic-gate #define	FLG_RE_NOTSUP		0x00010000	/* relocation not supported */
727c478bd9Sstevel@tonic-gate 
73552ff457Srie #define	FLG_RE_SEGREL		0x00040000	/* segment relative */
74552ff457Srie #define	FLG_RE_SECREL		0x00080000	/* section relative */
757c478bd9Sstevel@tonic-gate #define	FLG_RE_TLSINS		0x00100000	/* TLS instructino rel */
767c478bd9Sstevel@tonic-gate #define	FLG_RE_TLSGD		0x00200000	/* TLS GD relocation */
777c478bd9Sstevel@tonic-gate #define	FLG_RE_TLSLD		0x00400000	/* TLS LD relocation */
787c478bd9Sstevel@tonic-gate #define	FLG_RE_TLSIE		0x00800000	/* TLS IE relocation */
797c478bd9Sstevel@tonic-gate #define	FLG_RE_TLSLE		0x01000000	/* TLS LE relocation */
807c478bd9Sstevel@tonic-gate #define	FLG_RE_LOCLBND		0x02000000	/* relocation must bind */
817c478bd9Sstevel@tonic-gate 						/*    locally */
827c478bd9Sstevel@tonic-gate 
837c478bd9Sstevel@tonic-gate /*
845aefb655Srie  * In user land, redefine the relocation table and relocation engine to be
855aefb655Srie  * class specific if necessary.  This allows both engines to reside in the
865aefb655Srie  * intel/amd version of libld.
875aefb655Srie  */
885aefb655Srie #if	!defined(_KERNEL)
895aefb655Srie #if	defined(_ELF64)
905aefb655Srie #define	do_reloc		do64_reloc
915aefb655Srie #define	reloc_table		reloc64_table
925aefb655Srie #else
935aefb655Srie #define	do_reloc		do32_reloc
945aefb655Srie #define	reloc_table		reloc32_table
955aefb655Srie #endif
965aefb655Srie #endif
975aefb655Srie 
985aefb655Srie /*
995aefb655Srie  * Relocation table and macros for testing relocation table flags.
1007c478bd9Sstevel@tonic-gate  */
1017c478bd9Sstevel@tonic-gate extern	const Rel_entry		reloc_table[];
1027c478bd9Sstevel@tonic-gate 
1037c478bd9Sstevel@tonic-gate #define	IS_PLT(X)		((reloc_table[(X)].re_flags & \
1047c478bd9Sstevel@tonic-gate 					FLG_RE_PLTREL) != 0)
1057c478bd9Sstevel@tonic-gate #define	IS_GOT_RELATIVE(X)	((reloc_table[(X)].re_flags & \
1067c478bd9Sstevel@tonic-gate 					FLG_RE_GOTADD) != 0)
1077c478bd9Sstevel@tonic-gate #define	IS_GOT_PC(X)		((reloc_table[(X)].re_flags & \
1087c478bd9Sstevel@tonic-gate 					FLG_RE_GOTPC) != 0)
1097c478bd9Sstevel@tonic-gate #define	IS_GOTPCREL(X)		((reloc_table[(X)].re_flags & \
1107c478bd9Sstevel@tonic-gate 					(FLG_RE_GOTPC | FLG_RE_GOTADD)) == \
1117c478bd9Sstevel@tonic-gate 					(FLG_RE_GOTPC | FLG_RE_GOTADD))
1127c478bd9Sstevel@tonic-gate #define	IS_GOT_BASED(X)		((reloc_table[(X)].re_flags & \
1137c478bd9Sstevel@tonic-gate 					FLG_RE_GOTREL) != 0)
1147c478bd9Sstevel@tonic-gate #define	IS_GOT_INS(X)		((reloc_table[(X)].re_flags & \
1157c478bd9Sstevel@tonic-gate 					FLG_RE_GOTOPINS) != 0)
116141040e8Srie #define	IS_GOT_REQUIRED(X)	((reloc_table[(X)].re_flags & \
117141040e8Srie 					(FLG_RE_GOTADD | FLG_RE_GOTREL | \
118141040e8Srie 					FLG_RE_GOTPC | FLG_RE_GOTOPINS)) != 0)
1197c478bd9Sstevel@tonic-gate #define	IS_PC_RELATIVE(X)	((reloc_table[(X)].re_flags & \
1207c478bd9Sstevel@tonic-gate 					FLG_RE_PCREL) != 0)
1217c478bd9Sstevel@tonic-gate #define	IS_ADD_RELATIVE(X)	((reloc_table[(X)].re_flags & \
1227c478bd9Sstevel@tonic-gate 					FLG_RE_ADDRELATIVE) != 0)
1237c478bd9Sstevel@tonic-gate #define	IS_REGISTER(X)		((reloc_table[(X)].re_flags & \
1247c478bd9Sstevel@tonic-gate 					FLG_RE_REGISTER) != 0)
1257c478bd9Sstevel@tonic-gate #define	IS_FORMOFF(X)		((reloc_table[(X)].re_flags & \
1267c478bd9Sstevel@tonic-gate 					FLG_RE_FRMOFF) != 0)
1277c478bd9Sstevel@tonic-gate #define	IS_NOTSUP(X)		((reloc_table[(X)].re_flags & \
1287c478bd9Sstevel@tonic-gate 					FLG_RE_NOTSUP) != 0)
1297c478bd9Sstevel@tonic-gate #define	IS_SEG_RELATIVE(X)	((reloc_table[(X)].re_flags & \
1307c478bd9Sstevel@tonic-gate 					FLG_RE_SEGREL) != 0)
1317c478bd9Sstevel@tonic-gate #define	IS_EXTOFFSET(X)		((reloc_table[(X)].re_flags & \
1327c478bd9Sstevel@tonic-gate 					FLG_RE_EXTOFFSET) != 0)
1337c478bd9Sstevel@tonic-gate #define	IS_SEC_RELATIVE(X)	((reloc_table[(X)].re_flags & \
1347c478bd9Sstevel@tonic-gate 					FLG_RE_SECREL) != 0)
1357c478bd9Sstevel@tonic-gate #define	IS_TLS_INS(X)		((reloc_table[(X)].re_flags & \
1367c478bd9Sstevel@tonic-gate 					FLG_RE_TLSINS) != 0)
1377c478bd9Sstevel@tonic-gate #define	IS_TLS_GD(X)		((reloc_table[(X)].re_flags & \
1387c478bd9Sstevel@tonic-gate 					FLG_RE_TLSGD) != 0)
1397c478bd9Sstevel@tonic-gate #define	IS_TLS_LD(X)		((reloc_table[(X)].re_flags & \
1407c478bd9Sstevel@tonic-gate 					FLG_RE_TLSLD) != 0)
1417c478bd9Sstevel@tonic-gate #define	IS_TLS_IE(X)		((reloc_table[(X)].re_flags & \
1427c478bd9Sstevel@tonic-gate 					FLG_RE_TLSIE) != 0)
1437c478bd9Sstevel@tonic-gate #define	IS_TLS_LE(X)		((reloc_table[(X)].re_flags & \
1447c478bd9Sstevel@tonic-gate 					FLG_RE_TLSLE) != 0)
1457c478bd9Sstevel@tonic-gate #define	IS_TLS(X)		((reloc_table[(X)].re_flags & \
1467c478bd9Sstevel@tonic-gate 					(FLG_RE_TLSINS|FLG_RE_TLSGD| \
1477c478bd9Sstevel@tonic-gate 					FLG_RE_TLSLD|FLG_RE_TLSIE| \
1487c478bd9Sstevel@tonic-gate 					FLG_RE_TLSLE)) != 0)
1497c478bd9Sstevel@tonic-gate #define	IS_LOCALBND(X)		((reloc_table[(X)].re_flags & \
1507c478bd9Sstevel@tonic-gate 					FLG_RE_LOCLBND) != 0)
1517c478bd9Sstevel@tonic-gate 
1527c478bd9Sstevel@tonic-gate /*
1535aefb655Srie  * Relocation engine.
1547c478bd9Sstevel@tonic-gate  */
155552ff457Srie extern	int	do_reloc(uchar_t, uchar_t *, Xword *, const char *,
1565aefb655Srie 		    const char *, void *);
157552ff457Srie 
1587c478bd9Sstevel@tonic-gate #if defined(_KERNEL)
1597c478bd9Sstevel@tonic-gate /*
160552ff457Srie  * These are macro's that are only needed for krtld.  Many of these are already
161552ff457Srie  * defined in the sgs/include files referenced by ld and rtld
1627c478bd9Sstevel@tonic-gate  */
1637c478bd9Sstevel@tonic-gate #define	S_MASK(n)	((1l << (n)) - 1l)
1647c478bd9Sstevel@tonic-gate #define	S_INRANGE(v, n)	(((-(1l << (n)) - 1l) < (v)) && ((v) < (1l << (n))))
1657c478bd9Sstevel@tonic-gate 
1667c478bd9Sstevel@tonic-gate /*
167552ff457Srie  * Message strings used by doreloc().
1687c478bd9Sstevel@tonic-gate  */
1697c478bd9Sstevel@tonic-gate #define	MSG_STR_UNKNOWN		"(unknown)"
170552ff457Srie 
171552ff457Srie #define	MSG_REL_PREGEN		"relocation error: %s: "
172552ff457Srie #define	MSG_REL_PREFIL		"relocation error: file %s: "
173552ff457Srie #define	MSG_REL_FILE		"file %s: "
174552ff457Srie #define	MSG_REL_SYM		"symbol %s: "
175552ff457Srie #define	MSG_REL_VALUE		"value 0x%llx "
1767c478bd9Sstevel@tonic-gate #define	MSG_REL_LOSEBITS	"loses %d bits at "
1777c478bd9Sstevel@tonic-gate 
178552ff457Srie #define	MSG_REL_UNIMPL		"unimplemented relocation type: %d"
179552ff457Srie #define	MSG_REL_UNSUPSZ		"offset size (%d bytes) is not supported"
180552ff457Srie #define	MSG_REL_NONALIGN	"offset 0x%llx is non-aligned"
181552ff457Srie #define	MSG_REL_UNNOBITS	"unsupported number of bits: %d"
182552ff457Srie #define	MSG_REL_OFFSET		"offset 0x%llx"
183552ff457Srie #define	MSG_REL_NOFIT		"value 0x%llx does not fit"
184552ff457Srie 
1855aefb655Srie /*
1865aefb655Srie  * Provide a macro to select the appropriate conversion routine for this
1875aefb655Srie  * architecture.
1885aefb655Srie  */
1895aefb655Srie #if defined(__amd64)
1905aefb655Srie 
1915aefb655Srie extern const char	*conv_reloc_amd64_type(Word);
1925aefb655Srie #define	CONV_RELOC_TYPE	conv_reloc_amd64_type
1935aefb655Srie 
1945aefb655Srie #elif defined(__i386)
1955aefb655Srie 
1965aefb655Srie extern const char	*conv_reloc_386_type(Word);
1975aefb655Srie #define	CONV_RELOC_TYPE	conv_reloc_386_type
1985aefb655Srie 
1995aefb655Srie #elif defined(__sparc)
2005aefb655Srie 
2015aefb655Srie extern const char	*conv_reloc_SPARC_type(Word);
2025aefb655Srie #define	CONV_RELOC_TYPE	conv_reloc_SPARC_type
2035aefb655Srie 
2045aefb655Srie #else
2055aefb655Srie #error platform not defined!
2065aefb655Srie #endif
2077c478bd9Sstevel@tonic-gate 
2087c478bd9Sstevel@tonic-gate /*
2095aefb655Srie  * Note:  dlerror() only keeps track of a single error string, and therefore
2105aefb655Srie  * must have errors reported through a single eprintf() call.  The kernel's
2115aefb655Srie  * _kobj_printf is somewhat more limited, and must receive messages with only
2125aefb655Srie  * one argument to the format string.  The following macros account for these
2135aefb655Srie  * differences, as krtld and rtld share do_reloc().
2147c478bd9Sstevel@tonic-gate  */
2155aefb655Srie #define	REL_ERR_UNIMPL(lml, file, sym, rtype) \
216552ff457Srie 	_kobj_printf(ops, MSG_REL_PREFIL, (file)); \
217552ff457Srie 	_kobj_printf(ops, MSG_REL_SYM, ((sym) ? (sym) : MSG_STR_UNKNOWN)); \
218552ff457Srie 	_kobj_printf(ops, MSG_REL_UNIMPL, (int)(rtype))
219552ff457Srie 
2205aefb655Srie #define	REL_ERR_UNSUPSZ(lml, file, sym, rtype, size) \
221552ff457Srie 	_kobj_printf(ops, MSG_REL_PREGEN, CONV_RELOC_TYPE((rtype))); \
222552ff457Srie 	_kobj_printf(ops, MSG_REL_FILE, (file)); \
223552ff457Srie 	_kobj_printf(ops, MSG_REL_SYM, ((sym) ? (sym) : MSG_STR_UNKNOWN)); \
224552ff457Srie 	_kobj_printf(ops, MSG_REL_UNSUPSZ, (int)(size))
2257c478bd9Sstevel@tonic-gate 
2265aefb655Srie #define	REL_ERR_NONALIGN(lml, file, sym, rtype, off) \
227552ff457Srie 	_kobj_printf(ops, MSG_REL_PREGEN, CONV_RELOC_TYPE((rtype))); \
228552ff457Srie 	_kobj_printf(ops, MSG_REL_FILE, (file)); \
229552ff457Srie 	_kobj_printf(ops, MSG_REL_SYM, ((sym) ? (sym) : MSG_STR_UNKNOWN)); \
230552ff457Srie 	_kobj_printf(ops, MSG_REL_NONALIGN, EC_OFF((off)))
2317c478bd9Sstevel@tonic-gate 
2325aefb655Srie #define	REL_ERR_UNNOBITS(lml, file, sym, rtype, nbits) \
233552ff457Srie 	_kobj_printf(ops, MSG_REL_PREGEN, CONV_RELOC_TYPE((rtype))); \
234552ff457Srie 	_kobj_printf(ops, MSG_REL_FILE, (file)); \
235552ff457Srie 	_kobj_printf(ops, MSG_REL_SYM, ((sym) ? (sym) : MSG_STR_UNKNOWN)); \
236552ff457Srie 	_kobj_printf(ops, MSG_REL_UNNOBITS, (nbits))
2377c478bd9Sstevel@tonic-gate 
2385aefb655Srie #define	REL_ERR_LOSEBITS(lml, file, sym, rtype, uvalue, nbits, off) \
239552ff457Srie 	_kobj_printf(ops, MSG_REL_PREGEN, CONV_RELOC_TYPE((rtype))); \
240552ff457Srie 	_kobj_printf(ops, MSG_REL_FILE, (file)); \
241552ff457Srie 	_kobj_printf(ops, MSG_REL_SYM, ((sym) ? (sym) : MSG_STR_UNKNOWN)); \
242552ff457Srie 	_kobj_printf(ops, MSG_REL_VALUE, EC_XWORD((uvalue))); \
243552ff457Srie 	_kobj_printf(ops, MSG_REL_LOSEBITS, (int)(nbits)); \
2445aefb655Srie 	_kobj_printf(ops, MSG_REL_OFFSET, EC_NATPTR((off)))
2457c478bd9Sstevel@tonic-gate 
2465aefb655Srie #define	REL_ERR_NOFIT(lml, file, sym, rtype, uvalue) \
247552ff457Srie 	_kobj_printf(ops, MSG_REL_PREGEN, CONV_RELOC_TYPE((rtype))); \
248552ff457Srie 	_kobj_printf(ops, MSG_REL_FILE, (file)); \
249552ff457Srie 	_kobj_printf(ops, MSG_REL_SYM, ((sym) ? (sym) : MSG_STR_UNKNOWN)); \
250552ff457Srie 	_kobj_printf(ops, MSG_REL_NOFIT, EC_XWORD((uvalue)))
2517c478bd9Sstevel@tonic-gate 
2527c478bd9Sstevel@tonic-gate 
2537c478bd9Sstevel@tonic-gate #else	/* !_KERNEL */
2547c478bd9Sstevel@tonic-gate 
2557c478bd9Sstevel@tonic-gate extern	const char *demangle(const char *);
2567c478bd9Sstevel@tonic-gate 
2575aefb655Srie #define	REL_ERR_UNIMPL(lml, file, sym, rtype) \
2585aefb655Srie 	(eprintf(lml, ERR_FATAL, MSG_INTL(MSG_REL_UNIMPL), (file), \
259552ff457Srie 	    ((sym) ? demangle(sym) : MSG_INTL(MSG_STR_UNKNOWN)), (int)(rtype)))
260552ff457Srie 
2615aefb655Srie #define	REL_ERR_UNSUPSZ(lml, file, sym, rtype, size) \
2625aefb655Srie 	(eprintf(lml, ERR_FATAL, MSG_INTL(MSG_REL_UNSUPSZ), \
263*c13de8f6Sab196087 	    conv_reloc_type(M_MACH, (rtype), 0), (file), \
264552ff457Srie 	    ((sym) ? demangle(sym) : MSG_INTL(MSG_STR_UNKNOWN)), (int)(size)))
2657c478bd9Sstevel@tonic-gate 
2665aefb655Srie #define	REL_ERR_NONALIGN(lml, file, sym, rtype, off) \
2675aefb655Srie 	(eprintf(lml, ERR_FATAL, MSG_INTL(MSG_REL_NONALIGN), \
268*c13de8f6Sab196087 	    conv_reloc_type(M_MACH, (rtype), 0), (file), \
269552ff457Srie 	    ((sym) ? demangle(sym) : MSG_INTL(MSG_STR_UNKNOWN)), EC_OFF((off))))
2707c478bd9Sstevel@tonic-gate 
2715aefb655Srie #define	REL_ERR_UNNOBITS(lml, file, sym, rtype, nbits) \
2725aefb655Srie 	(eprintf(lml, ERR_FATAL, MSG_INTL(MSG_REL_UNNOBITS), \
273*c13de8f6Sab196087 	    conv_reloc_type(M_MACH, (rtype), 0), (file), \
2747c478bd9Sstevel@tonic-gate 	    ((sym) ? demangle(sym) : MSG_INTL(MSG_STR_UNKNOWN)), (nbits)))
2757c478bd9Sstevel@tonic-gate 
2765aefb655Srie #define	REL_ERR_LOSEBITS(lml, file, sym, rtype, uvalue, nbits, off) \
2775aefb655Srie 	(eprintf(lml, ERR_FATAL,  MSG_INTL(MSG_REL_LOSEBITS), \
278*c13de8f6Sab196087 	    conv_reloc_type(M_MACH, (rtype), 0), (file), \
2797c478bd9Sstevel@tonic-gate 	    ((sym) ? demangle(sym) : MSG_INTL(MSG_STR_UNKNOWN)), \
2805aefb655Srie 	    EC_XWORD((uvalue)), (nbits), EC_NATPTR((off))))
2817c478bd9Sstevel@tonic-gate 
2825aefb655Srie #define	REL_ERR_NOFIT(lml, file, sym, rtype, uvalue) \
2835aefb655Srie 	(eprintf(lml, ERR_FATAL, MSG_INTL(MSG_REL_NOFIT), \
284*c13de8f6Sab196087 	    conv_reloc_type(M_MACH, (rtype), 0), (file), \
2857c478bd9Sstevel@tonic-gate 	    ((sym) ? demangle(sym) : MSG_INTL(MSG_STR_UNKNOWN)), \
2867c478bd9Sstevel@tonic-gate 	    EC_XWORD((uvalue))))
2877c478bd9Sstevel@tonic-gate 
2887c478bd9Sstevel@tonic-gate #endif	/* _KERNEL */
2897c478bd9Sstevel@tonic-gate 
2907c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
2917c478bd9Sstevel@tonic-gate }
2927c478bd9Sstevel@tonic-gate #endif
2937c478bd9Sstevel@tonic-gate 
2947c478bd9Sstevel@tonic-gate #endif /* _RELOC_DOT_H */
295