translate: add ref hint, document others
[ia32rtools.git] / run_exp.sh
1 #!/bin/sh
2
3 outf=$3
4
5 grep '@' $1 | awk '{print $1}' > ${outf}_explist
6
7 echo ".text" > $outf
8 echo ".align 4" >> $outf
9
10 cat ${outf}_explist | while read i; do
11   sym=`echo $i | awk -F@ '{print $1}'`
12   if grep -q "$sym" $2; then
13     continue
14   fi
15
16   echo ".globl _$i" >> $outf
17   echo "_$i:" >> $outf
18   echo "  jmp $sym" >> $outf
19   echo >> $outf
20 done