38 lines
702 B
Plaintext
Executable file
38 lines
702 B
Plaintext
Executable file
set -o pipefail
|
|
|
|
function header() {
|
|
echo
|
|
echo
|
|
echo "# ----------------------------------------------------------------"
|
|
echo ".file \"$1\""
|
|
echo "# ----------------------------------------------------------------"
|
|
echo
|
|
}
|
|
|
|
args=
|
|
code=
|
|
until [ $# -eq 0 ]; do
|
|
case $1 in
|
|
--)
|
|
;;
|
|
-o|-I|-arch)
|
|
args="$args $1 $2"
|
|
shift
|
|
;;
|
|
-*)
|
|
args="$args $1"
|
|
;;
|
|
*)
|
|
# file="$(fix_asm $1)"
|
|
|
|
# # IFS=$'\n'
|
|
file=$(cat "$1")
|
|
|
|
code="$code$(header $1)"$'\n'"$file"
|
|
;;
|
|
esac
|
|
shift
|
|
done
|
|
echo "jer"
|
|
echo "$code" | fix_asm | as $args -
|