translate: add ref hint, document others
[ia32rtools.git] / run_exp.sh
... / ...
CommitLineData
1#!/bin/sh
2
3outf=$3
4
5grep '@' $1 | awk '{print $1}' > ${outf}_explist
6
7echo ".text" > $outf
8echo ".align 4" >> $outf
9
10cat ${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
20done