#! /bin/sh
#
# 5799-WZQ (C) COPYRIGHT IBM CORPORATION 1986
# LICENSED MATERIALS - PROPERTY OF IBM
# REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
#
# $Header:buildsym 12.0$ 
# $ACIS:buildsym 12.0$ 
# $Source: /ibm/acis/usr/sys/conf/RCS/buildsym,v $ 
#
# take a /vmunix input file and convert it to format acceptable 
# to the debugger 
#
# make sure path includes directories containing fixsyms and makesym
PATH=${PATH-/bin:/usr/bin}:../conf/:/sys/conf/:/usr/ibm
export PATH
input=${1?}
output=$2
nmfile=/tmp/nm$$
nm -n $input > $nmfile || exit 1
# convert NCS symbols if necessary
fixsyms $nmfile $nmfile.snm
# following sed makes the 'int' routines visable and also changes the
# virtual kernel addresses back into real addresses
( sed -e 's;^e;0;' -e 's; int; _int;' -e 's;mcount;_mcount;' $nmfile.snm ) |
	makesym -h > $output
rm -f $nmfile*
