#!/bin/bash # Generates a direct mapping between two functions in assembly code ( echo "section text" echo while read line; do if [[ $line == ";;*" ]]; then continue fi arrIN=(${line//;/ }) if [ ${#arrIN[@]} -ne 2 ]; then continue fi echo "global ${arrIN[0]}" echo "extern ${arrIN[1]}" echo "${arrIN[0]}:" echo " jmp ${arrIN[1]} WRT ..plt" echo done < "$1" ) > "${1%.lst}.asm"