1*69112eddSAli Bahrami /* 2*69112eddSAli Bahrami * CDDL HEADER START 3*69112eddSAli Bahrami * 4*69112eddSAli Bahrami * The contents of this file are subject to the terms of the 5*69112eddSAli Bahrami * Common Development and Distribution License (the "License"). 6*69112eddSAli Bahrami * You may not use this file except in compliance with the License. 7*69112eddSAli Bahrami * 8*69112eddSAli Bahrami * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*69112eddSAli Bahrami * or http://www.opensolaris.org/os/licensing. 10*69112eddSAli Bahrami * See the License for the specific language governing permissions 11*69112eddSAli Bahrami * and limitations under the License. 12*69112eddSAli Bahrami * 13*69112eddSAli Bahrami * When distributing Covered Code, include this CDDL HEADER in each 14*69112eddSAli Bahrami * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*69112eddSAli Bahrami * If applicable, add the following below this CDDL HEADER, with the 16*69112eddSAli Bahrami * fields enclosed by brackets "[]" replaced with your own identifying 17*69112eddSAli Bahrami * information: Portions Copyright [yyyy] [name of copyright owner] 18*69112eddSAli Bahrami * 19*69112eddSAli Bahrami * CDDL HEADER END 20*69112eddSAli Bahrami */ 21*69112eddSAli Bahrami 22*69112eddSAli Bahrami /* 23*69112eddSAli Bahrami * Copyright 2010 Sun Microsystems, Inc. All rights reserved. 24*69112eddSAli Bahrami * Use is subject to license terms. 25*69112eddSAli Bahrami */ 26*69112eddSAli Bahrami 27*69112eddSAli Bahrami /* 28*69112eddSAli Bahrami * String conversion routines for mapfile related items. 29*69112eddSAli Bahrami * These items are not ELF constructs. However, we have a need 30*69112eddSAli Bahrami * to display them. 31*69112eddSAli Bahrami */ 32*69112eddSAli Bahrami #include <stdio.h> 33*69112eddSAli Bahrami #include <_conv.h> 34*69112eddSAli Bahrami #include <map_msg.h> 35*69112eddSAli Bahrami 36*69112eddSAli Bahrami const char * 37*69112eddSAli Bahrami conv_mapfile_version(Word version, Conv_fmt_flags_t fmt_flags, 38*69112eddSAli Bahrami Conv_inv_buf_t *inv_buf) 39*69112eddSAli Bahrami { 40*69112eddSAli Bahrami static const Msg versions[] = { 41*69112eddSAli Bahrami MSG_VER_NONE, MSG_VER_SYSV, MSG_VER_SOLARIS 42*69112eddSAli Bahrami }; 43*69112eddSAli Bahrami #if MFV_NUM != (MFV_SOLARIS + 1) 44*69112eddSAli Bahrami #error "NT_NUM has grown. Update mapfile versions[]" 45*69112eddSAli Bahrami #endif 46*69112eddSAli Bahrami static const conv_ds_msg_t ds_versions = { 47*69112eddSAli Bahrami CONV_DS_MSG_INIT(MFV_NONE, versions) }; 48*69112eddSAli Bahrami static const conv_ds_t *ds[] = { CONV_DS_ADDR(ds_versions), NULL }; 49*69112eddSAli Bahrami 50*69112eddSAli Bahrami return (conv_map_ds(ELFOSABI_NONE, EM_NONE, version, ds, fmt_flags, 51*69112eddSAli Bahrami inv_buf)); 52*69112eddSAli Bahrami } 53