3 # Compare stripped copies of two given object files.
5 # Copyright (C) 2007 Free Software Foundation
6 # Originally by Alexandre Oliva <aoliva@redhat.com>
8 # This file is part of GCC.
10 # GCC is free software; you can redistribute it and/or modify it under
11 # the terms of the GNU General Public License as published by the Free
12 # Software Foundation; either version 3, or (at your option) any later
15 # GCC is distributed in the hope that it will be useful, but WITHOUT
16 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
18 # License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with GCC; see the file COPYING3. If not see
22 # <http://www.gnu.org/licenses/>.
25 echo 'usage: compare-debug file1.o file2.o' >&2
29 if test ! -f "$1"; then
30 echo "$1" does not exist
>&2
34 if test ! -f "$2"; then
35 echo "$2" does not exist
>&2
40 while test -f "$1.$suf1"; do
45 while test -f "$2.$suf2"; do
49 trap 'rm -f "$1.$suf1" "$2.$suf2"' 0 1 2 15
57 if cmp "$1.$suf1" "$2.$suf2"; then
63 rm -f "$1.$suf1" "$2.$suf2"
65 trap "exit $status; exit" 0 1 2 15