Print this page
7595 sgs native-proto fails on pre-7029 illumos-gate
Reviewed by: Richard Lowe <richlowe@richlowe.net>


   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  *      Copyright (c) 1988 AT&T
  24  *        All Rights Reserved
  25  *
  26  * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
  27  * Copyright 2012 DEY Storage Systems, Inc.  All rights reserved.

  28  */
  29 
  30 #ifndef _CONV_H
  31 #define _CONV_H
  32 
  33 /*
  34  * Global include file for conversion library.
  35  */
  36 
  37 #include <stdlib.h>
  38 #include <libelf.h>
  39 #include <dlfcn.h>
  40 #include <libld.h>
  41 #include <sgs.h>
  42 #include <sgsmsg.h>
  43 

  44 #include <sys/secflags.h>

  45 
  46 #ifdef  __cplusplus
  47 extern "C" {
  48 #endif
  49 
  50 /*
  51  * Configuration features available - maintained here (instead of debug.h)
  52  * to save libconv from having to include debug.h which results in numerous
  53  * "declared but not used or defined" lint errors.
  54  */
  55 #define CONF_EDLIBPATH  0x000100        /* ELF default library path */
  56 #define CONF_ESLIBPATH  0x000200        /* ELF secure library path */
  57 #define CONF_ADLIBPATH  0x000400        /* AOUT default library path */
  58 #define CONF_ASLIBPATH  0x000800        /* AOUT secure library path */
  59 #define CONF_DIRCFG     0x001000        /* directory configuration available */
  60 #define CONF_OBJALT     0x002000        /* object alternatives available */
  61 #define CONF_MEMRESV    0x004000        /* memory reservation required */
  62 #define CONF_ENVS       0x008000        /* environment variables available */
  63 #define CONF_FLTR       0x010000        /* filter information available */
  64 #define CONF_FEATMSK    0xffff00


 310 #define CONV_CNOTE_PR_FLAGS_BUFSIZE     254
 311 typedef union {
 312         Conv_inv_buf_t                  inv_buf;
 313         char                            buf[CONV_CNOTE_PR_FLAGS_BUFSIZE];
 314 } Conv_cnote_pr_flags_buf_t;
 315 
 316 /* conv_cnote_old_pr_flags() */
 317 #define CONV_CNOTE_OLD_PR_FLAGS_BUFSIZE 174
 318 typedef union {
 319         Conv_inv_buf_t                  inv_buf;
 320         char                            buf[CONV_CNOTE_OLD_PR_FLAGS_BUFSIZE];
 321 } Conv_cnote_old_pr_flags_buf_t;
 322 
 323 /* conv_cnote_proc_flag() */
 324 #define CONV_CNOTE_PROC_FLAG_BUFSIZE    39
 325 typedef union {
 326         Conv_inv_buf_t                  inv_buf;
 327         char                            buf[CONV_CNOTE_PROC_FLAG_BUFSIZE];
 328 } Conv_cnote_proc_flag_buf_t;
 329 

 330 /* conv_prsecflags() */
 331 #define CONV_PRSECFLAGS_BUFSIZE         57
 332 typedef union {
 333         Conv_inv_buf_t                  inv_buf;
 334         char                            buf[CONV_PRSECFLAGS_BUFSIZE];
 335 } Conv_secflags_buf_t;

 336 
 337 /* conv_cnote_sigset() */
 338 #define CONV_CNOTE_SIGSET_BUFSIZE       639
 339 typedef union {
 340         Conv_inv_buf_t                  inv_buf;
 341         char                            buf[CONV_CNOTE_SIGSET_BUFSIZE];
 342 } Conv_cnote_sigset_buf_t;
 343 
 344 /* conv_cnote_fltset() */
 345 #define CONV_CNOTE_FLTSET_BUFSIZE       511
 346 typedef union {
 347         Conv_inv_buf_t                  inv_buf;
 348         char                            buf[CONV_CNOTE_FLTSET_BUFSIZE];
 349 } Conv_cnote_fltset_buf_t;
 350 
 351 /* conv_cnote_sysset() */
 352 #define CONV_CNOTE_SYSSET_BUFSIZE       3195
 353 typedef union {
 354         Conv_inv_buf_t                  inv_buf;
 355         char                            buf[CONV_CNOTE_SYSSET_BUFSIZE];


 813 extern  const char      *conv_cnote_fltset(uint32_t *, int,
 814                             Conv_fmt_flags_t, Conv_cnote_fltset_buf_t *);
 815 extern  const char      *conv_cnote_old_pr_flags(int, Conv_fmt_flags_t,
 816                             Conv_cnote_old_pr_flags_buf_t *);
 817 extern  const char      *conv_cnote_pr_dmodel(Word, Conv_fmt_flags_t,
 818                             Conv_inv_buf_t *);
 819 extern  const char      *conv_cnote_pr_flags(int, Conv_fmt_flags_t,
 820                             Conv_cnote_pr_flags_buf_t *);
 821 extern  const char      *conv_cnote_proc_flag(int, Conv_fmt_flags_t,
 822                             Conv_cnote_proc_flag_buf_t *);
 823 extern  const char      *conv_cnote_pr_regname(Half, int, Conv_fmt_flags_t,
 824                             Conv_inv_buf_t *inv_buf);
 825 extern  const char      *conv_cnote_pr_stype(Word, Conv_fmt_flags_t,
 826                             Conv_inv_buf_t *);
 827 extern  const char      *conv_cnote_pr_what(short, short, Conv_fmt_flags_t,
 828                             Conv_inv_buf_t *);
 829 extern  const char      *conv_cnote_pr_why(short, Conv_fmt_flags_t,
 830                             Conv_inv_buf_t *);
 831 extern  const char      *conv_cnote_priv(int, Conv_fmt_flags_t,
 832                             Conv_inv_buf_t *);

 833 extern  const char      *conv_prsecflags(secflagset_t, Conv_fmt_flags_t,
 834                             Conv_secflags_buf_t *);

 835 extern  const char      *conv_cnote_psetid(int, Conv_fmt_flags_t,
 836                             Conv_inv_buf_t *);
 837 extern  const char      *conv_cnote_sa_flags(int, Conv_fmt_flags_t,
 838                             Conv_cnote_sa_flags_buf_t *);
 839 extern  const char      *conv_cnote_signal(Word, Conv_fmt_flags_t,
 840                             Conv_inv_buf_t *);
 841 extern  const char      *conv_cnote_si_code(Half, int, int, Conv_fmt_flags_t,
 842                             Conv_inv_buf_t *);
 843 extern  const char      *conv_cnote_sigset(uint32_t *, int,
 844                             Conv_fmt_flags_t, Conv_cnote_sigset_buf_t *);
 845 extern  const char      *conv_cnote_ss_flags(int, Conv_fmt_flags_t,
 846                             Conv_cnote_ss_flags_buf_t *);
 847 extern  const char      *conv_cnote_syscall(Word, Conv_fmt_flags_t,
 848                             Conv_inv_buf_t *);
 849 extern  const char      *conv_cnote_sysset(uint32_t *, int,
 850                             Conv_fmt_flags_t, Conv_cnote_sysset_buf_t *);
 851 extern  const char      *conv_cnote_fileflags(uint32_t, Conv_fmt_flags_t,
 852                             char *, size_t);
 853 extern  const char      *conv_cnote_filemode(uint32_t, Conv_fmt_flags_t,
 854                             char *, size_t);




   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  *      Copyright (c) 1988 AT&T
  24  *        All Rights Reserved
  25  *
  26  * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
  27  * Copyright 2012 DEY Storage Systems, Inc.  All rights reserved.
  28  * Copyright 2016 RackTop Systems.
  29  */
  30 
  31 #ifndef _CONV_H
  32 #define _CONV_H
  33 
  34 /*
  35  * Global include file for conversion library.
  36  */
  37 
  38 #include <stdlib.h>
  39 #include <libelf.h>
  40 #include <dlfcn.h>
  41 #include <libld.h>
  42 #include <sgs.h>
  43 #include <sgsmsg.h>
  44 
  45 #ifndef NATIVE_BUILD
  46 #include <sys/secflags.h>
  47 #endif
  48 
  49 #ifdef  __cplusplus
  50 extern "C" {
  51 #endif
  52 
  53 /*
  54  * Configuration features available - maintained here (instead of debug.h)
  55  * to save libconv from having to include debug.h which results in numerous
  56  * "declared but not used or defined" lint errors.
  57  */
  58 #define CONF_EDLIBPATH  0x000100        /* ELF default library path */
  59 #define CONF_ESLIBPATH  0x000200        /* ELF secure library path */
  60 #define CONF_ADLIBPATH  0x000400        /* AOUT default library path */
  61 #define CONF_ASLIBPATH  0x000800        /* AOUT secure library path */
  62 #define CONF_DIRCFG     0x001000        /* directory configuration available */
  63 #define CONF_OBJALT     0x002000        /* object alternatives available */
  64 #define CONF_MEMRESV    0x004000        /* memory reservation required */
  65 #define CONF_ENVS       0x008000        /* environment variables available */
  66 #define CONF_FLTR       0x010000        /* filter information available */
  67 #define CONF_FEATMSK    0xffff00


 313 #define CONV_CNOTE_PR_FLAGS_BUFSIZE     254
 314 typedef union {
 315         Conv_inv_buf_t                  inv_buf;
 316         char                            buf[CONV_CNOTE_PR_FLAGS_BUFSIZE];
 317 } Conv_cnote_pr_flags_buf_t;
 318 
 319 /* conv_cnote_old_pr_flags() */
 320 #define CONV_CNOTE_OLD_PR_FLAGS_BUFSIZE 174
 321 typedef union {
 322         Conv_inv_buf_t                  inv_buf;
 323         char                            buf[CONV_CNOTE_OLD_PR_FLAGS_BUFSIZE];
 324 } Conv_cnote_old_pr_flags_buf_t;
 325 
 326 /* conv_cnote_proc_flag() */
 327 #define CONV_CNOTE_PROC_FLAG_BUFSIZE    39
 328 typedef union {
 329         Conv_inv_buf_t                  inv_buf;
 330         char                            buf[CONV_CNOTE_PROC_FLAG_BUFSIZE];
 331 } Conv_cnote_proc_flag_buf_t;
 332 
 333 #ifndef NATIVE_BUILD
 334 /* conv_prsecflags() */
 335 #define CONV_PRSECFLAGS_BUFSIZE         57
 336 typedef union {
 337         Conv_inv_buf_t                  inv_buf;
 338         char                            buf[CONV_PRSECFLAGS_BUFSIZE];
 339 } Conv_secflags_buf_t;
 340 #endif
 341 
 342 /* conv_cnote_sigset() */
 343 #define CONV_CNOTE_SIGSET_BUFSIZE       639
 344 typedef union {
 345         Conv_inv_buf_t                  inv_buf;
 346         char                            buf[CONV_CNOTE_SIGSET_BUFSIZE];
 347 } Conv_cnote_sigset_buf_t;
 348 
 349 /* conv_cnote_fltset() */
 350 #define CONV_CNOTE_FLTSET_BUFSIZE       511
 351 typedef union {
 352         Conv_inv_buf_t                  inv_buf;
 353         char                            buf[CONV_CNOTE_FLTSET_BUFSIZE];
 354 } Conv_cnote_fltset_buf_t;
 355 
 356 /* conv_cnote_sysset() */
 357 #define CONV_CNOTE_SYSSET_BUFSIZE       3195
 358 typedef union {
 359         Conv_inv_buf_t                  inv_buf;
 360         char                            buf[CONV_CNOTE_SYSSET_BUFSIZE];


 818 extern  const char      *conv_cnote_fltset(uint32_t *, int,
 819                             Conv_fmt_flags_t, Conv_cnote_fltset_buf_t *);
 820 extern  const char      *conv_cnote_old_pr_flags(int, Conv_fmt_flags_t,
 821                             Conv_cnote_old_pr_flags_buf_t *);
 822 extern  const char      *conv_cnote_pr_dmodel(Word, Conv_fmt_flags_t,
 823                             Conv_inv_buf_t *);
 824 extern  const char      *conv_cnote_pr_flags(int, Conv_fmt_flags_t,
 825                             Conv_cnote_pr_flags_buf_t *);
 826 extern  const char      *conv_cnote_proc_flag(int, Conv_fmt_flags_t,
 827                             Conv_cnote_proc_flag_buf_t *);
 828 extern  const char      *conv_cnote_pr_regname(Half, int, Conv_fmt_flags_t,
 829                             Conv_inv_buf_t *inv_buf);
 830 extern  const char      *conv_cnote_pr_stype(Word, Conv_fmt_flags_t,
 831                             Conv_inv_buf_t *);
 832 extern  const char      *conv_cnote_pr_what(short, short, Conv_fmt_flags_t,
 833                             Conv_inv_buf_t *);
 834 extern  const char      *conv_cnote_pr_why(short, Conv_fmt_flags_t,
 835                             Conv_inv_buf_t *);
 836 extern  const char      *conv_cnote_priv(int, Conv_fmt_flags_t,
 837                             Conv_inv_buf_t *);
 838 #ifndef NATIVE_BUILD
 839 extern  const char      *conv_prsecflags(secflagset_t, Conv_fmt_flags_t,
 840                             Conv_secflags_buf_t *);
 841 #endif
 842 extern  const char      *conv_cnote_psetid(int, Conv_fmt_flags_t,
 843                             Conv_inv_buf_t *);
 844 extern  const char      *conv_cnote_sa_flags(int, Conv_fmt_flags_t,
 845                             Conv_cnote_sa_flags_buf_t *);
 846 extern  const char      *conv_cnote_signal(Word, Conv_fmt_flags_t,
 847                             Conv_inv_buf_t *);
 848 extern  const char      *conv_cnote_si_code(Half, int, int, Conv_fmt_flags_t,
 849                             Conv_inv_buf_t *);
 850 extern  const char      *conv_cnote_sigset(uint32_t *, int,
 851                             Conv_fmt_flags_t, Conv_cnote_sigset_buf_t *);
 852 extern  const char      *conv_cnote_ss_flags(int, Conv_fmt_flags_t,
 853                             Conv_cnote_ss_flags_buf_t *);
 854 extern  const char      *conv_cnote_syscall(Word, Conv_fmt_flags_t,
 855                             Conv_inv_buf_t *);
 856 extern  const char      *conv_cnote_sysset(uint32_t *, int,
 857                             Conv_fmt_flags_t, Conv_cnote_sysset_buf_t *);
 858 extern  const char      *conv_cnote_fileflags(uint32_t, Conv_fmt_flags_t,
 859                             char *, size_t);
 860 extern  const char      *conv_cnote_filemode(uint32_t, Conv_fmt_flags_t,
 861                             char *, size_t);