diff options
| author | Paul Richards <paul@FreeBSD.org> | 1993-11-03 00:56:24 +0000 |
|---|---|---|
| committer | Paul Richards <paul@FreeBSD.org> | 1993-11-03 00:56:24 +0000 |
| commit | 3bab57bf8e94dcfa7f63ca3dfe2d903b5dda75bc (patch) | |
| tree | c6947a527e76f67f3d2eb22488df6f6ca9734b47 /gnu/usr.bin/as/testscripts/doobjcmp | |
| parent | 81fc6236e6282ee57c0a9dfd75135aaab443c1e3 (diff) | |
Notes
Diffstat (limited to 'gnu/usr.bin/as/testscripts/doobjcmp')
| -rwxr-xr-x | gnu/usr.bin/as/testscripts/doobjcmp | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/gnu/usr.bin/as/testscripts/doobjcmp b/gnu/usr.bin/as/testscripts/doobjcmp new file mode 100755 index 000000000000..6c90cf9a05ff --- /dev/null +++ b/gnu/usr.bin/as/testscripts/doobjcmp @@ -0,0 +1,89 @@ +#!/bin/sh +# $Id: doobjcmp,v 1.1 1993/10/02 21:01:08 pk Exp $ +# compare two object files, in depth. + +x=$1 +y=$2 +BOTH="$1 $2" + + +# if they cmp, we're fine. +if (cmp $BOTH > /dev/null) +then + exit 0 +fi + +# otherwise, we must look closer. +if (doboth $BOTH size) +then + echo Sizes ok. +else + echo Sizes differ: + size $BOTH +# exit 1 +fi + +if (doboth $BOTH objdump +header) +then + echo Headers ok. +else + echo Header differences. +# exit 1 +fi + +if (doboth $BOTH objdump +text > /dev/null) +then + echo Text ok. +else + echo Text differences. +# doboth $BOTH objdump +text +# exit 1 +fi + +if (doboth $BOTH objdump +data > /dev/null) +then + echo Data ok. +else + echo Data differences. +# doboth $BOTH objdump +data +# exit 1 +fi + +if (doboth $BOTH objdump +symbols > /dev/null) +then + echo Symbols ok. +else + echo -n Symbol differences... + + if (doboth $BOTH dounsortsymbols) + then + echo but symbols are simply ordered differently. +# echo Now what to do about relocs'?' +# exit 1 + else + echo and symbols differ in content. + exit 1 + fi +fi + +# of course, if there were symbol diffs, then the reloc symbol indexes +# will be off. + +if (doboth $BOTH objdump -r > /dev/null) +then + echo Reloc ok. +else + echo -n Reloc differences... + + if (doboth $BOTH dounsortreloc) + then + echo but relocs are simply ordered differently. + else + echo and relocs differ in content. + exit 1 + fi +fi + +exit + +# eof |
