xref: /illumos-gate/usr/src/cmd/sgs/elfdump/common/gen_layout_obj.c (revision d48be21240dfd051b689384ce2b23479d757f2d8)
1 /*
2  * This file and its contents are supplied under the terms of the
3  * Common Development and Distribution License ("CDDL"), version 1.0.
4  * You may only use this file in accordance with the terms of version
5  * 1.0 of the CDDL.
6  *
7  * A full copy of the text of the CDDL should have accompanied this
8  * source.  A copy of the CDDL is also available via the Internet at
9  * http://www.illumos.org/license/CDDL.
10  */
11 
12 /*
13  * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
14  * Copyright 2018 Joyent, Inc.
15  * Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
16  */
17 
18 /*
19  * A little program who's only purpose is to get all the
20  * CTF type information we want into an object.
21  */
22 
23 #include <sys/types.h>
24 #include <sys/stat.h>
25 #include <sys/sysmacros.h>
26 #include <sys/corectl.h>
27 #define	_STRUCTURED_PROC	1
28 #include <sys/procfs.h>
29 #include <sys/auxv.h>
30 #include <sys/old_procfs.h>
31 #include <sys/utsname.h>
32 #include <sys/secflags.h>
33 
34 /* prgregset_t is a define on intel */
35 #ifdef prgregset_t
36 typedef	prgregset_t
37 #undef prgregset_t
38     prgregset_t;
39 #endif
40 
41 /* instantiate the types for CTF */
42 auxv_t auxv;
43 prgregset_t prgregset;
44 lwpstatus_t lwpstatus;
45 pstatus_t pstatus;
46 prstatus_t prstatus;
47 psinfo_t psinfo;
48 prpsinfo_t prpsinfo;
49 lwpsinfo_t lwpsinfo;
50 prcred_t prcred;
51 prpriv_t prpriv;
52 priv_impl_info_t priv_impl;
53 fltset_t fltset;
54 siginfo_t siginfo;
55 sigset_t sigset;
56 struct sigaction sigact;
57 stack_t stack;
58 sysset_t sysset;
59 timestruc_t ts;
60 struct utsname uts;
61 prfdinfo_core_t ptfd;
62 prsecflags_t psf;
63 prlwpname_t psn;
64 prupanic_t pru;
65