echo ".align 4" >> $2
cat $2_implist | while read i; do
- rm -f tmpsym
+ rm -f $2_tmpsym
case $i in
__imp_*)
si=`echo $i | cut -c 7-`
while read f; do
sym=`i586-mingw32msvc-nm $f | grep "\<_$si\>" | grep ' T ' | awk '{print $3}'`
if test -n "$sym"; then
- echo $sym > tmpsym
+ echo $sym > $2_tmpsym
break
fi
done
- sym=`cat tmpsym`
+ sym=`cat $2_tmpsym`
if test -z "$sym"; then
echo "no file/sym for $i, lf $f"
exit 1
#!/bin/sh
set -e
-echo -n > $3
+echo -n > $1
-cat $1 | \
+cat $2 | \
while read a; do
a_no_at=`echo $a | awk -F@ '{printf $1}'`
- #echo "$a_no_at equ _$a" >> $3
- #echo "EXTRN _$a:PROC" >> $3
- echo "EXTRN $a:PROC" >> $3
+ #echo "$a_no_at equ _$a" >> $1
+ #echo "EXTRN _$a:PROC" >> $1
+ echo "EXTRN $a:PROC" >> $1
done
-echo "; '_' funcs" >> $3
+if test -n "$3"; then
+ echo "; '_' funcs" >> $1
-cat $2 | \
-while read a; do
- case $a in
- \#*)
- continue
- ;;
- \;*)
- continue
- ;;
- "")
- continue
- ;;
- *)
- ;;
- esac
+ cat $3 | \
+ while read a; do
+ case $a in
+ \#*)
+ continue
+ ;;
+ \;*)
+ continue
+ ;;
+ "")
+ continue
+ ;;
+ *)
+ ;;
+ esac
- echo "EXTRN $a:PROC" >> $3
-done
+ echo "EXTRN $a:PROC" >> $1
+ done
+fi
#!/bin/sh
set -e
-echo -n > $3
+echo -n > $1
-cat $1 | fromdos | sed -e \
-'1,/^_rdata.*segment/d;/^_data_last/q;/^[[:blank:];]/d;/^;/d;/^_r\?data\>/d;' | awk '{print $1}' | \
+cat $2 | fromdos | sed -e \
+'1,/^_rdata.*segment/d;/^_data.*\<ends\>/q;/^[[:blank:];]/d;/^;/d;/^_r\?data\>/d;' | awk '{print $1}' | \
while read a; do
test -z "$a" && continue
case $a in
__IMPORT_DESCRIPTOR*)
continue
;;
+ _data)
+ continue
+ ;;
*)
;;
esac
- echo "_$a equ $a" >> $3
- echo "PUBLIC _$a" >> $3
+ echo "_$a equ $a" >> $1
+ echo "PUBLIC _$a" >> $1
done
-echo "; funcs called from C" >> $3
+if test -n "$3"; then
+ echo "; funcs called from C" >> $1
-cat $2 | \
-while read a; do
-# echo "_$a equ $a" >> $3
-# echo "PUBLIC _$a" >> $3
- a=`echo $a | awk -F@ '{print $1}'`
- echo "PUBLIC $a" >> $3
-done
+ cat $3 | \
+ while read a; do
+# echo "_$a equ $a" >> $1
+# echo "PUBLIC _$a" >> $1
+ a=`echo $a | awk -F@ '{print $1}'`
+ echo "PUBLIC $a" >> $1
+ done
+fi