]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gas/testsuite/lib/doobjcmp
* config/sh/tm-sh.h (BELIEVE_PCC_PROMOTION): Define, so that
[thirdparty/binutils-gdb.git] / gas / testsuite / lib / doobjcmp
CommitLineData
acf11ed1
KR
1#!/bin/sh
2# $Id$
3# compare two object files, in depth.
4
5x=$1
6y=$2
7BOTH="$1 $2"
8
9
10# if they cmp, we're fine.
11if (cmp $BOTH > /dev/null)
12then
13 exit 0
14fi
15
16# otherwise, we must look closer.
17if (doboth $BOTH size)
18then
19 echo Sizes ok.
20else
21 echo Sizes differ:
22 size $BOTH
23# exit 1
24fi
25
26if (doboth $BOTH objdump +header)
27then
28 echo Headers ok.
29else
30 echo Header differences.
31# exit 1
32fi
33
34if (doboth $BOTH objdump +text > /dev/null)
35then
36 echo Text ok.
37else
38 echo Text differences.
39# doboth $BOTH objdump +text
40# exit 1
41fi
42
43if (doboth $BOTH objdump +data > /dev/null)
44then
45 echo Data ok.
46else
47 echo Data differences.
48# doboth $BOTH objdump +data
49# exit 1
50fi
51
52if (doboth $BOTH objdump +symbols > /dev/null)
53then
54 echo Symbols ok.
55else
56 echo -n Symbol differences...
57
58 if (doboth $BOTH dounsortsymbols)
59 then
60 echo but symbols are simply ordered differently.
61# echo Now what to do about relocs'?'
62# exit 1
63 else
64 echo and symbols differ in content.
65 exit 1
66 fi
67fi
68
69# of course, if there were symbol diffs, then the reloc symbol indexes
70# will be off.
71
72if (doboth $BOTH objdump -r > /dev/null)
73then
74 echo Reloc ok.
75else
76 echo -n Reloc differences...
77
78 if (doboth $BOTH dounsortreloc)
79 then
80 echo but relocs are simply ordered differently.
81 else
82 echo and relocs differ in content.
83 exit 1
84 fi
85fi
86
87exit
88
89# eof