6 echo "usage: genassym [-o outfile] objfile"
13 ${NM:='nm'} ${NMFLAGS} "$1" | ${AWK:='awk'} '
15 sign = substr($1, length($1) - 3, 4)
21 w0 = substr($1, length($1) - 3, 4)
24 w1 = substr($1, length($1) - 3, 4)
27 w2 = substr($1, length($1) - 3, 4)
30 w3 = substr($1, length($1) - 3, 4)
39 # This still has minor problems representing INT_MIN, etc.
41 # with 32-bit 2''s complement ints, this prints -0x80000000,
42 # which has the wrong type (unsigned int).
43 printf("#define\t%s\t%s%s%s\n", $3, sign, hex, w)
52 while getopts "o:" option
60 shift $(($OPTIND - 1))
66 if [ "$use_outfile" = "yes" ]
68 work $1 3>"$outfile" >&3 3>&-