URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.20.1/] [gas/] [testsuite/] [lib/] [doobjcmp] - Rev 205
Compare with Previous | Blame | View Log
#!/bin/sh# compare two object files, in depth.x=$1y=$2BOTH="$1 $2"# if they cmp, we're fine.if (cmp $BOTH > /dev/null)thenexit 0fi# otherwise, we must look closer.if (doboth $BOTH size)thenecho Sizes ok.elseecho Sizes differ:size $BOTH# exit 1fiif (doboth $BOTH objdump +header)thenecho Headers ok.elseecho Header differences.# exit 1fiif (doboth $BOTH objdump +text > /dev/null)thenecho Text ok.elseecho Text differences.# doboth $BOTH objdump +text# exit 1fiif (doboth $BOTH objdump +data > /dev/null)thenecho Data ok.elseecho Data differences.# doboth $BOTH objdump +data# exit 1fiif (doboth $BOTH objdump +symbols > /dev/null)thenecho Symbols ok.elseecho -n Symbol differences...if (doboth $BOTH dounsortsymbols)thenecho but symbols are simply ordered differently.# echo Now what to do about relocs'?'# exit 1elseecho and symbols differ in content.exit 1fifi# of course, if there were symbol diffs, then the reloc symbol indexes# will be off.if (doboth $BOTH objdump -r > /dev/null)thenecho Reloc ok.elseecho -n Reloc differences...if (doboth $BOTH dounsortreloc)thenecho but relocs are simply ordered differently.elseecho and relocs differ in content.exit 1fifiexit# eof
