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 /* 230Sstevel@tonic-gate * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 240Sstevel@tonic-gate * Use is subject to license terms. 250Sstevel@tonic-gate */ 260Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 270Sstevel@tonic-gate 280Sstevel@tonic-gate /* 290Sstevel@tonic-gate * String conversion routine for .dynamic tag entries. 300Sstevel@tonic-gate */ 310Sstevel@tonic-gate #include <stdio.h> 320Sstevel@tonic-gate #include <string.h> 330Sstevel@tonic-gate #include <sys/elf_SPARC.h> 34*280Srie #include "rtld.h" 350Sstevel@tonic-gate #include "_conv.h" 360Sstevel@tonic-gate #include "dynamic_msg.h" 370Sstevel@tonic-gate 380Sstevel@tonic-gate #define POSSZ MSG_GBL_OSQBRKT_SIZE + \ 390Sstevel@tonic-gate MSG_DFP_LAZYLOAD_SIZE + \ 400Sstevel@tonic-gate MSG_DFP_GROUPPERM_SIZE + \ 410Sstevel@tonic-gate MSG_GBL_CSQBRKT_SIZE 420Sstevel@tonic-gate 430Sstevel@tonic-gate const char * 440Sstevel@tonic-gate conv_dynposflag_1_str(uint_t flags) 450Sstevel@tonic-gate { 460Sstevel@tonic-gate static char string[POSSZ] = { '\0' }; 470Sstevel@tonic-gate if (flags == 0) 480Sstevel@tonic-gate return (MSG_ORIG(MSG_GBL_ZERO)); 490Sstevel@tonic-gate 500Sstevel@tonic-gate (void) strcpy(string, MSG_ORIG(MSG_GBL_OSQBRKT)); 510Sstevel@tonic-gate 520Sstevel@tonic-gate if (flags & DF_P1_LAZYLOAD) 530Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DFP_LAZYLOAD)); 540Sstevel@tonic-gate if (flags & DF_P1_GROUPPERM) 550Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DFP_GROUPPERM)); 560Sstevel@tonic-gate 570Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_GBL_CSQBRKT)); 580Sstevel@tonic-gate 590Sstevel@tonic-gate return ((const char *)string); 600Sstevel@tonic-gate } 610Sstevel@tonic-gate 620Sstevel@tonic-gate #define FLAGSZ MSG_DF_ORIGIN_SIZE + \ 630Sstevel@tonic-gate MSG_DF_SYMBOLIC_SIZE + \ 640Sstevel@tonic-gate MSG_DF_TEXTREL_SIZE + \ 650Sstevel@tonic-gate MSG_DF_BIND_NOW_SIZE + \ 660Sstevel@tonic-gate MSG_DF_STATIC_TLS_SIZE 670Sstevel@tonic-gate 680Sstevel@tonic-gate const char * 690Sstevel@tonic-gate conv_dynflag_str(uint_t flags) 700Sstevel@tonic-gate { 710Sstevel@tonic-gate static char string[FLAGSZ] = { '\0' }; 720Sstevel@tonic-gate if (flags == 0) 730Sstevel@tonic-gate return (MSG_ORIG(MSG_GBL_ZERO)); 740Sstevel@tonic-gate else { 750Sstevel@tonic-gate (void) strcpy(string, MSG_ORIG(MSG_GBL_OSQBRKT)); 760Sstevel@tonic-gate if (flags & DF_ORIGIN) 770Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF_ORIGIN)); 780Sstevel@tonic-gate if (flags & DF_SYMBOLIC) 790Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF_SYMBOLIC)); 800Sstevel@tonic-gate if (flags & DF_TEXTREL) 810Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF_TEXTREL)); 820Sstevel@tonic-gate if (flags & DF_BIND_NOW) 830Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF_BIND_NOW)); 840Sstevel@tonic-gate if (flags & DF_STATIC_TLS) 850Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF_STATIC_TLS)); 860Sstevel@tonic-gate 870Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_GBL_CSQBRKT)); 880Sstevel@tonic-gate 890Sstevel@tonic-gate return ((const char *)string); 900Sstevel@tonic-gate } 910Sstevel@tonic-gate } 920Sstevel@tonic-gate 930Sstevel@tonic-gate #define FLAG1SZ MSG_GBL_OSQBRKT_SIZE + \ 940Sstevel@tonic-gate MSG_DF1_NOW_SIZE + \ 950Sstevel@tonic-gate MSG_DF1_GROUP_SIZE + \ 960Sstevel@tonic-gate MSG_DF1_NODELETE_SIZE + \ 970Sstevel@tonic-gate MSG_DF1_LOADFLTR_SIZE + \ 980Sstevel@tonic-gate MSG_DF1_INITFIRST_SIZE + \ 990Sstevel@tonic-gate MSG_DF1_NOOPEN_SIZE + \ 1000Sstevel@tonic-gate MSG_DF1_ORIGIN_SIZE + \ 1010Sstevel@tonic-gate MSG_DF1_DIRECT_SIZE + \ 1020Sstevel@tonic-gate MSG_DF1_TRANS_SIZE + \ 1030Sstevel@tonic-gate MSG_DF1_INTERPOSE_SIZE + \ 1040Sstevel@tonic-gate MSG_DF1_NODEFLIB_SIZE + \ 1050Sstevel@tonic-gate MSG_DF1_NODUMP_SIZE + \ 1060Sstevel@tonic-gate MSG_DF1_CONFALT_SIZE + \ 1070Sstevel@tonic-gate MSG_DF1_ENDFILTEE_SIZE + \ 1080Sstevel@tonic-gate MSG_DF1_DISPRELPND_SIZE + \ 1090Sstevel@tonic-gate MSG_DF1_DISPRELDNE_SIZE + \ 1100Sstevel@tonic-gate MSG_DF1_NODIRECT_SIZE + \ 1110Sstevel@tonic-gate MSG_DF1_IGNMULDEF_SIZE + \ 1120Sstevel@tonic-gate MSG_DF1_NOKSYMS_SIZE + \ 1130Sstevel@tonic-gate MSG_DF1_NORELOC_SIZE + \ 1140Sstevel@tonic-gate MSG_GBL_CSQBRKT_SIZE 1150Sstevel@tonic-gate 1160Sstevel@tonic-gate const char * 1170Sstevel@tonic-gate conv_dynflag_1_str(uint_t flags) 1180Sstevel@tonic-gate { 1190Sstevel@tonic-gate static char string[FLAG1SZ] = { '\0' }; 1200Sstevel@tonic-gate 1210Sstevel@tonic-gate if (flags == 0) 1220Sstevel@tonic-gate return (MSG_ORIG(MSG_GBL_ZERO)); 1230Sstevel@tonic-gate else { 1240Sstevel@tonic-gate (void) strcpy(string, MSG_ORIG(MSG_GBL_OSQBRKT)); 1250Sstevel@tonic-gate 1260Sstevel@tonic-gate if (flags & DF_1_NOW) 1270Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF1_NOW)); 1280Sstevel@tonic-gate if (flags & DF_1_GROUP) 1290Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF1_GROUP)); 1300Sstevel@tonic-gate if (flags & DF_1_NODELETE) 1310Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF1_NODELETE)); 1320Sstevel@tonic-gate if (flags & DF_1_LOADFLTR) 1330Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF1_LOADFLTR)); 1340Sstevel@tonic-gate if (flags & DF_1_INITFIRST) 1350Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF1_INITFIRST)); 1360Sstevel@tonic-gate if (flags & DF_1_NOOPEN) 1370Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF1_NOOPEN)); 1380Sstevel@tonic-gate if (flags & DF_1_ORIGIN) 1390Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF1_ORIGIN)); 1400Sstevel@tonic-gate if (flags & DF_1_DIRECT) 1410Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF1_DIRECT)); 1420Sstevel@tonic-gate if (flags & DF_1_TRANS) 1430Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF1_TRANS)); 1440Sstevel@tonic-gate if (flags & DF_1_INTERPOSE) 1450Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF1_INTERPOSE)); 1460Sstevel@tonic-gate if (flags & DF_1_NODEFLIB) 1470Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF1_NODEFLIB)); 1480Sstevel@tonic-gate if (flags & DF_1_NODUMP) 1490Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF1_NODUMP)); 1500Sstevel@tonic-gate if (flags & DF_1_CONFALT) 1510Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF1_CONFALT)); 1520Sstevel@tonic-gate if (flags & DF_1_ENDFILTEE) 1530Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF1_ENDFILTEE)); 1540Sstevel@tonic-gate if (flags & DF_1_DISPRELPND) 1550Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF1_DISPRELPND)); 1560Sstevel@tonic-gate if (flags & DF_1_DISPRELDNE) 1570Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF1_DISPRELDNE)); 1580Sstevel@tonic-gate if (flags & DF_1_NODIRECT) 1590Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF1_NODIRECT)); 1600Sstevel@tonic-gate if (flags & DF_1_IGNMULDEF) 1610Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF1_IGNMULDEF)); 1620Sstevel@tonic-gate if (flags & DF_1_NOKSYMS) 1630Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF1_NOKSYMS)); 1640Sstevel@tonic-gate if (flags & DF_1_NORELOC) 1650Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DF1_NORELOC)); 1660Sstevel@tonic-gate 1670Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_GBL_CSQBRKT)); 1680Sstevel@tonic-gate 1690Sstevel@tonic-gate return ((const char *)string); 1700Sstevel@tonic-gate } 1710Sstevel@tonic-gate } 1720Sstevel@tonic-gate 1730Sstevel@tonic-gate #define FEATSZ MSG_GBL_OSQBRKT_SIZE + \ 1740Sstevel@tonic-gate MSG_DTF_PARINIT_SIZE + \ 1750Sstevel@tonic-gate MSG_DTF_CONFEXP_SIZE + \ 1760Sstevel@tonic-gate MSG_GBL_CSQBRKT_SIZE 1770Sstevel@tonic-gate 1780Sstevel@tonic-gate const char * 1790Sstevel@tonic-gate conv_dynfeature_1_str(uint_t flags) 1800Sstevel@tonic-gate { 1810Sstevel@tonic-gate static char string[FEATSZ] = { '\0' }; 1820Sstevel@tonic-gate 1830Sstevel@tonic-gate if (flags == 0) 1840Sstevel@tonic-gate return (MSG_ORIG(MSG_GBL_ZERO)); 1850Sstevel@tonic-gate else { 1860Sstevel@tonic-gate (void) strcpy(string, MSG_ORIG(MSG_GBL_OSQBRKT)); 1870Sstevel@tonic-gate 1880Sstevel@tonic-gate if (flags & DTF_1_PARINIT) 1890Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DTF_PARINIT)); 1900Sstevel@tonic-gate if (flags & DTF_1_CONFEXP) 1910Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_DTF_CONFEXP)); 1920Sstevel@tonic-gate 1930Sstevel@tonic-gate (void) strcat(string, MSG_ORIG(MSG_GBL_CSQBRKT)); 1940Sstevel@tonic-gate 1950Sstevel@tonic-gate return ((const char *)string); 1960Sstevel@tonic-gate } 1970Sstevel@tonic-gate } 1980Sstevel@tonic-gate 1990Sstevel@tonic-gate const Msg _dyntag_tags[DT_MAXPOSTAGS] = { 2000Sstevel@tonic-gate MSG_DYN_NULL, MSG_DYN_NEEDED, MSG_DYN_PLTRELSZ, 2010Sstevel@tonic-gate MSG_DYN_PLTGOT, MSG_DYN_HASH, MSG_DYN_STRTAB, 2020Sstevel@tonic-gate MSG_DYN_SYMTAB, MSG_DYN_RELA, MSG_DYN_RELASZ, 2030Sstevel@tonic-gate MSG_DYN_RELAENT, MSG_DYN_STRSZ, MSG_DYN_SYMENT, 2040Sstevel@tonic-gate MSG_DYN_INIT, MSG_DYN_FINI, MSG_DYN_SONAME, 2050Sstevel@tonic-gate MSG_DYN_RPATH, MSG_DYN_SYMBOLIC, MSG_DYN_REL, 2060Sstevel@tonic-gate MSG_DYN_RELSZ, MSG_DYN_RELENT, MSG_DYN_PLTREL, 2070Sstevel@tonic-gate MSG_DYN_DEBUG, MSG_DYN_TEXTREL, MSG_DYN_JMPREL, 2080Sstevel@tonic-gate MSG_DYN_BIND_NOW, MSG_DYN_INIT_ARRAY, MSG_DYN_FINI_ARRAY, 2090Sstevel@tonic-gate MSG_DYN_INIT_ARRAYSZ, MSG_DYN_FINI_ARRAYSZ, MSG_DYN_RUNPATH, 2100Sstevel@tonic-gate MSG_DYN_FLAGS, MSG_DYN_NULL, MSG_DYN_PREINIT_ARRAY, 2110Sstevel@tonic-gate MSG_DYN_PREINIT_ARRAYSZ 2120Sstevel@tonic-gate }; 2130Sstevel@tonic-gate 2140Sstevel@tonic-gate const char * 2150Sstevel@tonic-gate conv_dyntag_str(uint64_t tag, ushort_t mach) 2160Sstevel@tonic-gate { 2170Sstevel@tonic-gate static char string[STRSIZE] = { '\0' }; 2180Sstevel@tonic-gate 2190Sstevel@tonic-gate if (tag < DT_MAXPOSTAGS) { 2200Sstevel@tonic-gate /* 2210Sstevel@tonic-gate * Generic dynamic tags. 2220Sstevel@tonic-gate */ 2230Sstevel@tonic-gate return (MSG_ORIG(_dyntag_tags[tag])); 2240Sstevel@tonic-gate } else { 2250Sstevel@tonic-gate /* 2260Sstevel@tonic-gate * SUNW: DT_LOOS -> DT_HIOS range. 2270Sstevel@tonic-gate */ 2280Sstevel@tonic-gate if (tag == DT_SUNW_AUXILIARY) 2290Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_SUNW_AUXILIARY)); 2300Sstevel@tonic-gate else if (tag == DT_SUNW_RTLDINF) 2310Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_SUNW_RTLDINF)); 2320Sstevel@tonic-gate else if (tag == DT_SUNW_FILTER) 2330Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_SUNW_FILTER)); 2340Sstevel@tonic-gate else if (tag == DT_SUNW_CAP) 2350Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_SUNW_CAP)); 2360Sstevel@tonic-gate 2370Sstevel@tonic-gate /* 2380Sstevel@tonic-gate * SUNW: DT_VALRNGLO - DT_VALRNGHI range. 2390Sstevel@tonic-gate */ 2400Sstevel@tonic-gate else if (tag == DT_CHECKSUM) 2410Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_CHECKSUM)); 2420Sstevel@tonic-gate else if (tag == DT_PLTPADSZ) 2430Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_PLTPADSZ)); 2440Sstevel@tonic-gate else if (tag == DT_MOVEENT) 2450Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_MOVEENT)); 2460Sstevel@tonic-gate else if (tag == DT_MOVESZ) 2470Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_MOVESZ)); 2480Sstevel@tonic-gate else if (tag == DT_FEATURE_1) 2490Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_FEATURE_1)); 2500Sstevel@tonic-gate else if (tag == DT_POSFLAG_1) 2510Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_POSFLAG_1)); 2520Sstevel@tonic-gate else if (tag == DT_SYMINSZ) 2530Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_SYMINSZ)); 2540Sstevel@tonic-gate else if (tag == DT_SYMINENT) 2550Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_SYMINENT)); 2560Sstevel@tonic-gate 2570Sstevel@tonic-gate /* 2580Sstevel@tonic-gate * SUNW: DT_ADDRRNGLO - DT_ADDRRNGHI range. 2590Sstevel@tonic-gate */ 2600Sstevel@tonic-gate else if (tag == DT_CONFIG) 2610Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_CONFIG)); 2620Sstevel@tonic-gate else if (tag == DT_DEPAUDIT) 2630Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_DEPAUDIT)); 2640Sstevel@tonic-gate else if (tag == DT_AUDIT) 2650Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_AUDIT)); 2660Sstevel@tonic-gate else if (tag == DT_PLTPAD) 2670Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_PLTPAD)); 2680Sstevel@tonic-gate else if (tag == DT_MOVETAB) 2690Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_MOVETAB)); 2700Sstevel@tonic-gate else if (tag == DT_SYMINFO) 2710Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_SYMINFO)); 2720Sstevel@tonic-gate 2730Sstevel@tonic-gate /* 2740Sstevel@tonic-gate * SUNW: generic range. 2750Sstevel@tonic-gate */ 2760Sstevel@tonic-gate else if (tag == DT_VERSYM) 2770Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_VERSYM)); 2780Sstevel@tonic-gate else if (tag == DT_RELACOUNT) 2790Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_RELACOUNT)); 2800Sstevel@tonic-gate else if (tag == DT_RELCOUNT) 2810Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_RELCOUNT)); 2820Sstevel@tonic-gate else if (tag == DT_FLAGS_1) 2830Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_FLAGS_1)); 2840Sstevel@tonic-gate else if (tag == DT_VERDEF) 2850Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_VERDEF)); 2860Sstevel@tonic-gate else if (tag == DT_VERDEFNUM) 2870Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_VERDEFNUM)); 2880Sstevel@tonic-gate else if (tag == DT_VERNEED) 2890Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_VERNEED)); 2900Sstevel@tonic-gate else if (tag == DT_VERNEEDNUM) 2910Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_VERNEEDNUM)); 2920Sstevel@tonic-gate else if (tag == DT_AUXILIARY) 2930Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_AUXILIARY)); 2940Sstevel@tonic-gate else if (tag == DT_USED) 2950Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_USED)); 2960Sstevel@tonic-gate else if (tag == DT_FILTER) 2970Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_FILTER)); 2980Sstevel@tonic-gate 2990Sstevel@tonic-gate /* 3000Sstevel@tonic-gate * SUNW: machine specific range. 3010Sstevel@tonic-gate */ 3020Sstevel@tonic-gate else if (((mach == EM_SPARC) || (mach == EM_SPARCV9) || 3030Sstevel@tonic-gate (mach == EM_SPARC32PLUS)) && (tag == DT_SPARC_REGISTER)) 3040Sstevel@tonic-gate /* this is so x86 can display a sparc binary */ 3050Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_REGISTER)); 3060Sstevel@tonic-gate else if (tag == DT_DEPRECATED_SPARC_REGISTER) 3070Sstevel@tonic-gate return (MSG_ORIG(MSG_DYN_REGISTER)); 3080Sstevel@tonic-gate else 3090Sstevel@tonic-gate return (conv_invalid_str(string, STRSIZE, tag, 0)); 3100Sstevel@tonic-gate } 3110Sstevel@tonic-gate } 312*280Srie 313*280Srie #define BINDESZ MSG_GBL_OSQBRKT_SIZE + \ 314*280Srie MSG_BND_NEEDED_SIZE + \ 315*280Srie MSG_BND_REFER_SIZE + \ 316*280Srie MSG_BND_FILTER_SIZE + \ 317*280Srie MSG_GBL_CSQBRKT_SIZE 318*280Srie 319*280Srie const char * 320*280Srie conv_bindent_str(uint_t flags) 321*280Srie { 322*280Srie static char string[BINDESZ] = { '\0' }; 323*280Srie 324*280Srie /* 325*280Srie * Evaluate the binding descriptors flags. 326*280Srie */ 327*280Srie if (flags) { 328*280Srie (void) strcpy(string, MSG_ORIG(MSG_GBL_OSQBRKT)); 329*280Srie if (flags & BND_NEEDED) 330*280Srie (void) strcat(string, MSG_ORIG(MSG_BND_NEEDED)); 331*280Srie if (flags & BND_REFER) 332*280Srie (void) strcat(string, MSG_ORIG(MSG_BND_REFER)); 333*280Srie if (flags & BND_FILTER) 334*280Srie (void) strcat(string, MSG_ORIG(MSG_BND_FILTER)); 335*280Srie (void) strcat(string, MSG_ORIG(MSG_GBL_CSQBRKT)); 336*280Srie 337*280Srie return ((const char *)string); 338*280Srie } else 339*280Srie return (MSG_ORIG(MSG_STR_EMPTY)); 340*280Srie } 341*280Srie 342*280Srie #define BINDSSZ MSG_GBL_OSQBRKT_SIZE + \ 343*280Srie MSG_BND_ADDED_SIZE + \ 344*280Srie MSG_BND_REEVAL_SIZE + \ 345*280Srie MSG_GBL_CSQBRKT_SIZE 346*280Srie 347*280Srie const char * 348*280Srie conv_binding_str(uint_t flags) 349*280Srie { 350*280Srie static char string[BINDSSZ] = { '\0' }; 351*280Srie 352*280Srie /* 353*280Srie * Evaluate the binding descriptors flags. 354*280Srie */ 355*280Srie if (flags) { 356*280Srie (void) strcpy(string, MSG_ORIG(MSG_GBL_OSQBRKT)); 357*280Srie if (flags & LML_FLG_OBJADDED) 358*280Srie (void) strcat(string, MSG_ORIG(MSG_BND_ADDED)); 359*280Srie if (flags & LML_FLG_OBJREEVAL) 360*280Srie (void) strcat(string, MSG_ORIG(MSG_BND_REEVAL)); 361*280Srie if (flags & LML_FLG_OBJDELETED) 362*280Srie (void) strcat(string, MSG_ORIG(MSG_BND_DELETED)); 363*280Srie if (flags & LML_FLG_ATEXIT) 364*280Srie (void) strcat(string, MSG_ORIG(MSG_BND_ATEXIT)); 365*280Srie (void) strcat(string, MSG_ORIG(MSG_GBL_CSQBRKT)); 366*280Srie 367*280Srie return ((const char *)string); 368*280Srie } else 369*280Srie return (MSG_ORIG(MSG_STR_EMPTY)); 370*280Srie } 371