head	1.1;
access;
symbols
	perseant-exfatfs-base-20250801:1.1
	perseant-exfatfs-base-20240630:1.1
	perseant-exfatfs:1.1.0.18
	perseant-exfatfs-base:1.1
	cjep_sun2x:1.1.0.16
	cjep_sun2x-base:1.1
	cjep_staticlib_x-base1:1.1
	cjep_staticlib_x:1.1.0.14
	cjep_staticlib_x-base:1.1
	phil-wifi-20200421:1.1
	phil-wifi-20200411:1.1
	phil-wifi-20200406:1.1
	pgoyette-compat-merge-20190127:1.1
	pgoyette-compat-20190127:1.1
	pgoyette-compat-20190118:1.1
	pgoyette-compat-1226:1.1
	pgoyette-compat-1126:1.1
	pgoyette-compat-1020:1.1
	pgoyette-compat-0930:1.1
	pgoyette-compat-0906:1.1
	pgoyette-compat-0728:1.1
	pgoyette-compat-0625:1.1
	pgoyette-compat-0521:1.1
	pgoyette-compat-0502:1.1
	pgoyette-compat-0422:1.1
	pgoyette-compat-0415:1.1
	pgoyette-compat-0407:1.1
	pgoyette-compat-0330:1.1
	pgoyette-compat-0322:1.1
	pgoyette-compat-0315:1.1
	pgoyette-compat:1.1.0.12
	pgoyette-compat-base:1.1
	prg-localcount2-base3:1.1
	prg-localcount2-base2:1.1
	prg-localcount2-base1:1.1
	prg-localcount2:1.1.0.10
	prg-localcount2-base:1.1
	pgoyette-localcount-20170426:1.1
	bouyer-socketcan-base1:1.1
	pgoyette-localcount-20170320:1.1
	bouyer-socketcan:1.1.0.8
	bouyer-socketcan-base:1.1
	pgoyette-localcount-20170107:1.1
	pgoyette-localcount-20161104:1.1
	localcount-20160914:1.1
	pgoyette-localcount-20160806:1.1
	pgoyette-localcount-20160726:1.1
	pgoyette-localcount:1.1.0.6
	pgoyette-localcount-base:1.1
	yamt-pagecache-base9:1.1
	tls-earlyentropy:1.1.0.4
	tls-earlyentropy-base:1.1
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1
	riastradh-drm2-base3:1.1
	tls-maxphys-base:1.1
	agc-symver:1.1.0.2;
locks; strict;
comment	@# @;


1.1
date	2013.04.01.07.04.25;	author agc;	state dead;
branches
	1.1.2.1;
next	;

1.1.2.1
date	2013.04.01.07.04.25;	author agc;	state Exp;
branches;
next	;


desc
@@


1.1
log
@file mkvermap was initially added on branch agc-symver.
@
text
@@


1.1.2.1
log
@add the script used to generate the Version.map files
@
text
@a0 69
#! /bin/sh

# $NetBSD: genraidconf.sh,v 1.5 2011/05/19 00:24:22 agc Exp $

# Copyright (c) 2013 Alistair Crooks <agc@@NetBSD.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

# Usage: mkvermap c
#	makes symbol versioning info for /usr/lib/libc.so

major=0
minor=0
minimus=0
if [ -f shlib_version ]; then
	. ./shlib_version
fi
os="$(uname -r)"
output=Version.map
while [ $# -gt 0 ]; do
	case "$1" in
	--major=*)		major=${1#--major=} ;;
	--minor=*)		minor=${1#--minor=} ;;
	--os=*)			os=${1#--os=} ;;
	--output=*)		output=${1#--output=} ;;
	-o)			output=$2; shift ;;
	-v)			set -x ;;
	*)			break ;;
	esac
	shift
done

LIB=$1

nm /usr/lib/lib${LIB}.so |
	awk '$2 ~ /^[BCDRTWV]$/ { print "\t" $3 ";" }' |
	sort -u |
	awk -v LIB=${LIB} -v osver="${os}" -v major=${major} -v minor=${minor} -v minimus=${minimus} '
	BEGIN {
		printf("LIB%s_%s.%s.%s.0 {\nglobal:\n", toupper(LIB), major, minor, minimus)
	}
	{ print }
	END {
		printf("};\n\n");
		printf("NetBSD_%s.0 {\n} LIB%s_%s.%s.%s.0;\n\n", osver, toupper(LIB), major, minor, minimus);
		printf("LIB%s_private_%s.%s.%s.0 {\nlocal:\n\t*;\n};\n\n", toupper(LIB), major, minor, minimus);
	}' > ${output}

exit 0
@

