xref: /titanic_52/usr/src/cmd/sgs/prof/common/symint.h (revision 92ed17828163bd22e8650252460319b94ef9aa74)
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, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 
23 /*
24  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
25  * Use is subject to license terms.
26  */
27 
28 /*	Copyright (c) 1988 AT&T	*/
29 /*	  All Rights Reserved  	*/
30 
31 
32 	/* protect against multiple inclusion */
33 #ifndef _SYMINT_H
34 #define	_SYMINT_H
35 
36 #pragma ident	"%Z%%M%	%I%	%E% SMI"
37 
38 #include "symintHdr.h"
39 
40 #ifdef  __cplusplus
41 extern "C" {
42 #endif
43 
44 /*
45  * symint.c -- symbol information interface routines,
46  *		interface definition.
47  *
48  * these routines form a symbol information access
49  * interface, for the profilers to get at object file
50  * information.  this interface was designed to aid
51  * in the COFF to ELF conversion of prof, lprof and friends.
52  *
53  * this file includes all declarative information required
54  * by a user of this interface.
55  *
56  * ASSUMPTIONS
57  * ===========
58  *
59  * 1.	that there exists a routine _Malloc, with the following
60  * 	(effective) prototype:
61  * 		char * _Malloc (int item_count, int item_size);
62  * 	which does NOT (necessarily) initialize the allocated storage,
63  * 	and which issues an error message and calls exit() if
64  * 	the storage could not be allocated.
65  *
66  */
67 
68 
69 /*
70  * the interface routines:
71  *
72  * 	1. open an object file, set up PROF_FILE et al. (_symintOpen).
73  * 	1. close an object file, clean up PROF_FILE et al. (_symintClose).
74  *
75  * the data:
76  *
77  * 	(none yet.)
78  *
79  */
80 
81 PROF_FILE *_symintOpen(char *aout_name);	/* NULL or ptr */
82 void _symintClose(PROF_FILE *profPtr);		/* nuttin */
83 PROF_SYMBOL *_symintLoad(PROF_FILE *proffilePtr);
84 
85 /*
86  * required to be provided by the user of the interface...
87  */
88 
89 void *_Malloc(uint_t item_count, uint_t item_size);
90 void _err_exit(char *format_s, ...);
91 
92 #ifdef  __cplusplus
93 }
94 #endif
95 
96 #endif	/* _SYMINT_H */
97