Commit | Line | Data |
---|---|---|
74cea048 | 1 | #!/bin/sh |
2 | ||
99e67928 | 3 | outf=$3 |
74cea048 | 4 | |
99e67928 | 5 | grep '@' $1 | awk '{print $1}' > ${outf}_explist |
74cea048 | 6 | |
99e67928 | 7 | echo ".text" > $outf |
8 | echo ".align 4" >> $outf | |
9 | ||
10 | cat ${outf}_explist | while read i; do | |
74cea048 | 11 | sym=`echo $i | awk -F@ '{print $1}'` |
99e67928 | 12 | if grep -q "$sym" $2; then |
13 | continue | |
14 | fi | |
74cea048 | 15 | |
99e67928 | 16 | echo ".globl _$i" >> $outf |
17 | echo "_$i:" >> $outf | |
18 | echo " jmp $sym" >> $outf | |
19 | echo >> $outf | |
74cea048 | 20 | done |