0005-z80-A.sh (2377B)
1 #!/bin/sh 2 3 set -e 4 5 tmp1=`mktemp` 6 tmp2=`mktemp` 7 trap "rm -f f.out f.a $tmp1 $tmp2; exit" 0 2 3 8 9 rm -f f.a 10 scc-ar -qv f.a z80.out 11 cp z80.out f.out 12 scc-ar -qv f.a f.out 13 scc-nm -A f.a z80.out > $tmp1 14 15 cat <<! > $tmp2 16 f.a[z80.out]: 0000000000000000 b .bss 17 f.a[z80.out]: 0000000000000000 d .data 18 f.a[z80.out]: 0000000000000000 t .text 19 f.a[z80.out]: 0000000000000001 B averylongbss 20 f.a[z80.out]: 0000000000000001 D averylongdata 21 f.a[z80.out]: 0000000000000001 T averylongtext 22 f.a[z80.out]: 0000000000000000 B bss1 23 f.a[z80.out]: 0000000000000002 b bss3 24 f.a[z80.out]: 000000000000000a C bss4 25 f.a[z80.out]: 0000000000000012 C bss5 26 f.a[z80.out]: 0000000000000000 D data1 27 f.a[z80.out]: 0000000000000002 d data3 28 f.a[z80.out]: 000000000000000a C data4 29 f.a[z80.out]: 0000000000000012 C data5 30 f.a[z80.out]: 0000000000000000 T text1 31 f.a[z80.out]: 0000000000000002 t text3 32 f.a[z80.out]: 000000000000000a C text4 33 f.a[z80.out]: 0000000000000012 C text5 34 f.a[z80.out]: U text6 35 f.a[f.out]: 0000000000000000 b .bss 36 f.a[f.out]: 0000000000000000 d .data 37 f.a[f.out]: 0000000000000000 t .text 38 f.a[f.out]: 0000000000000001 B averylongbss 39 f.a[f.out]: 0000000000000001 D averylongdata 40 f.a[f.out]: 0000000000000001 T averylongtext 41 f.a[f.out]: 0000000000000000 B bss1 42 f.a[f.out]: 0000000000000002 b bss3 43 f.a[f.out]: 000000000000000a C bss4 44 f.a[f.out]: 0000000000000012 C bss5 45 f.a[f.out]: 0000000000000000 D data1 46 f.a[f.out]: 0000000000000002 d data3 47 f.a[f.out]: 000000000000000a C data4 48 f.a[f.out]: 0000000000000012 C data5 49 f.a[f.out]: 0000000000000000 T text1 50 f.a[f.out]: 0000000000000002 t text3 51 f.a[f.out]: 000000000000000a C text4 52 f.a[f.out]: 0000000000000012 C text5 53 f.a[f.out]: U text6 54 z80.out: 0000000000000000 b .bss 55 z80.out: 0000000000000000 d .data 56 z80.out: 0000000000000000 t .text 57 z80.out: 0000000000000001 B averylongbss 58 z80.out: 0000000000000001 D averylongdata 59 z80.out: 0000000000000001 T averylongtext 60 z80.out: 0000000000000000 B bss1 61 z80.out: 0000000000000002 b bss3 62 z80.out: 000000000000000a C bss4 63 z80.out: 0000000000000012 C bss5 64 z80.out: 0000000000000000 D data1 65 z80.out: 0000000000000002 d data3 66 z80.out: 000000000000000a C data4 67 z80.out: 0000000000000012 C data5 68 z80.out: 0000000000000000 T text1 69 z80.out: 0000000000000002 t text3 70 z80.out: 000000000000000a C text4 71 z80.out: 0000000000000012 C text5 72 z80.out: U text6 73 ! 74 75 diff $tmp1 $tmp2