home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 7
/
FreshFishVol7.bin
/
bbs
/
gnu
/
binutils-1.8.x-src.lha
/
GNU
/
src
/
amiga
/
binutils-1.8.x
/
libconvert
< prev
next >
Wrap
Text File
|
1993-09-22
|
821b
|
47 lines
#! /bin/sh
if [ $# != 2 ]
then
echo 'usage: libconvert from.a to.a'
exit 1
fi
fromlib=$1
tolib=$2
#
# Convert coff libc to a coff-encapsulated libc
# suitable for linking with the GNU linker.
#
# Extract all members of /lib/libc.a (using coff ar).
# Convert each using robotussin.
# Create new libc (using gnu ar) with members in the same order as coff libc.
# set -e makes this script exit if any command gets an error
set -e
case $fromlib in
/*) rel_fromlib=$fromlib ;;
*) rel_fromlib=../$fromlib ;;
esac
case $tolib in
/*) rel_tolib=$tolib ;;
*) rel_tolib=../$tolib ;;
esac
rm -rf libconvert-tmp
mkdir libconvert-tmp
cd libconvert-tmp
/bin/ar x $rel_fromlib
for i in *
do
echo $i
../robotussin $i x
mv x $i
done
rm -f $rel_tolib
../ar rs $rel_tolib `/bin/ar t $rel_fromlib`
cd ..
rm -rf libconvert-tmp