10Sstevel@tonic-gate /*
20Sstevel@tonic-gate * CDDL HEADER START
30Sstevel@tonic-gate *
40Sstevel@tonic-gate * The contents of this file are subject to the terms of the
50Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only
60Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance
70Sstevel@tonic-gate * with the License.
80Sstevel@tonic-gate *
90Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
100Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
110Sstevel@tonic-gate * See the License for the specific language governing permissions
120Sstevel@tonic-gate * and limitations under the License.
130Sstevel@tonic-gate *
140Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
150Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
160Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
170Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
180Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
190Sstevel@tonic-gate *
200Sstevel@tonic-gate * CDDL HEADER END
210Sstevel@tonic-gate */
220Sstevel@tonic-gate /*
23*211Smike_s * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
240Sstevel@tonic-gate * Use is subject to license terms.
250Sstevel@tonic-gate */
260Sstevel@tonic-gate /* Copyright (c) 1988 AT&T */
270Sstevel@tonic-gate /* All Rights Reserved */
280Sstevel@tonic-gate
290Sstevel@tonic-gate
300Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI"
310Sstevel@tonic-gate
320Sstevel@tonic-gate #include "symint.h"
330Sstevel@tonic-gate
340Sstevel@tonic-gate #include <stdio.h>
350Sstevel@tonic-gate #include <stdarg.h>
36*211Smike_s #include <stdlib.h>
370Sstevel@tonic-gate
38*211Smike_s /*
390Sstevel@tonic-gate * symintFcns.c -- symbol information interface routines.
40*211Smike_s *
410Sstevel@tonic-gate * these routines form a symbol information access
420Sstevel@tonic-gate * interface, for the profilers to get at object file
430Sstevel@tonic-gate * information. this interface was designed to aid
440Sstevel@tonic-gate * in the COFF to ELF conversion of prof, lprof and friends.
45*211Smike_s *
460Sstevel@tonic-gate */
470Sstevel@tonic-gate
480Sstevel@tonic-gate
49*211Smike_s /*
500Sstevel@tonic-gate * _err_exit(format_s, va_alist)
510Sstevel@tonic-gate * format_s - printf(3S) arg string.
520Sstevel@tonic-gate * va_alist - var_args(3?) printf() arguments.
53*211Smike_s *
540Sstevel@tonic-gate * does not return - prints message and calls exit(3).
55*211Smike_s *
56*211Smike_s *
570Sstevel@tonic-gate * this routine spits out a message (passed as above)
580Sstevel@tonic-gate * and exits.
590Sstevel@tonic-gate */
600Sstevel@tonic-gate
61*211Smike_s /* PRINTFLIKE1 */
62*211Smike_s void
_err_exit(char * format_s,...)630Sstevel@tonic-gate _err_exit(char *format_s, ...)
640Sstevel@tonic-gate {
650Sstevel@tonic-gate va_list ap;
660Sstevel@tonic-gate
67*211Smike_s (void) fprintf(stderr, "fatal error: ");
680Sstevel@tonic-gate va_start(ap, format_s);
69*211Smike_s (void) vfprintf(stderr, format_s, ap);
700Sstevel@tonic-gate va_end(ap);
71*211Smike_s (void) fprintf(stderr, "\n");
720Sstevel@tonic-gate
730Sstevel@tonic-gate exit(1);
740Sstevel@tonic-gate }
75