2 # Copyright (C) 2012 Red Hat, Inc.
3 # This file is part of elfutils.
5 # This file is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # elfutils is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 . $srcdir/test-subr.sh
22 # #define HELLO "world"
25 # main(int argc, char ** argv)
27 # return strlen (HELLO);
30 # gcc -gdwarf-4 -g3 -o testfile-macros macro.c
31 # gcc -gstrict-dwarf -gdwarf-4 -g3 -o testfile-macinfo macro.c
33 testfiles testfile-macinfo testfile-macros
37 testrun ../src/readelf --debug-dump=info testfile-macinfo \
38 | grep macro_info > readelf.macros.out ||
39 { echo "*** failure readelf --debug-dump=info testfile-macinfo"; status=1; }
40 testrun_compare cat readelf.macros.out <<\EOF
41 macro_info (sec_offset) 0
44 testrun ../src/readelf --debug-dump=info testfile-macros \
45 | grep GNU_macros > readelf.macros.out ||
46 { echo "*** failure readelf --debug-dump=info testfile-macros"; status=1; }
47 testrun_compare cat readelf.macros.out <<\EOF
48 GNU_macros (sec_offset) 0
51 rm -f readelf.macros.out