2 # $FreeBSD: src/gnu/usr.bin/as/testscripts/doobjcmp,v 1.4 1999/08/27 23:34:35 peter Exp $
3 # compare two object files, in depth.
10 # if they cmp, we're fine.
11 if (cmp $BOTH > /dev/null)
16 # otherwise, we must look closer.
17 if (doboth $BOTH size)
26 if (doboth $BOTH objdump +header)
30 echo Header differences.
34 if (doboth $BOTH objdump +text > /dev/null)
38 echo Text differences.
39 # doboth $BOTH objdump +text
43 if (doboth $BOTH objdump +data > /dev/null)
47 echo Data differences.
48 # doboth $BOTH objdump +data
52 if (doboth $BOTH objdump +symbols > /dev/null)
56 echo -n Symbol differences...
58 if (doboth $BOTH dounsortsymbols)
60 echo but symbols are simply ordered differently.
61 # echo Now what to do about relocs'?'
64 echo and symbols differ in content.
69 # of course, if there were symbol diffs, then the reloc symbol indexes
72 if (doboth $BOTH objdump -r > /dev/null)
76 echo -n Reloc differences...
78 if (doboth $BOTH dounsortreloc)
80 echo but relocs are simply ordered differently.
82 echo and relocs differ in content.