Home | History | Annotate | Download | only in tests
      1 #! /bin/sh
      2 # Copyright (C) 2015 Red Hat, Inc.
      3 # This file is part of elfutils.
      4 #
      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.
      9 #
     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.
     14 #
     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/>.
     17 
     18 . $srcdir/test-subr.sh
     19 
     20 # See run-elfgetchdr.sh for testfiles.
     21 
     22 testfiles testfile-zgnu64
     23 testrun_compare ${abs_top_builddir}/src/readelf -z -x.zdebug_aranges testfile-zgnu64 <<\EOF
     24 
     25 Hex dump of section [2] '.zdebug_aranges', 50 bytes (96 uncompressed) at offset 0x260:
     26   0x00000000 2c000000 02000000 00000800 00000000 ,...............
     27   0x00000010 78004000 00000000 14000000 00000000 x.@.............
     28   0x00000020 00000000 00000000 00000000 00000000 ................
     29   0x00000030 2c000000 02005500 00000800 00000000 ,.....U.........
     30   0x00000040 8c004000 00000000 16000000 00000000 ..@.............
     31   0x00000050 00000000 00000000 00000000 00000000 ................
     32 EOF
     33 
     34 testfiles testfile-zgabi64
     35 testrun_compare ${abs_top_builddir}/src/readelf -z -x.debug_aranges testfile-zgabi64 <<\EOF
     36 
     37 Hex dump of section [2] '.debug_aranges', 62 bytes (96 uncompressed) at offset 0x260:
     38   0x00000000 2c000000 02000000 00000800 00000000 ,...............
     39   0x00000010 78004000 00000000 14000000 00000000 x.@.............
     40   0x00000020 00000000 00000000 00000000 00000000 ................
     41   0x00000030 2c000000 02005500 00000800 00000000 ,.....U.........
     42   0x00000040 8c004000 00000000 16000000 00000000 ..@.............
     43   0x00000050 00000000 00000000 00000000 00000000 ................
     44 EOF
     45 
     46 testfiles testfile-zgnu32
     47 testrun_compare ${abs_top_builddir}/src/readelf -z -x.zdebug_aranges testfile-zgnu32 <<\EOF
     48 
     49 Hex dump of section [2] '.zdebug_aranges', 49 bytes (64 uncompressed) at offset 0x1c0:
     50   0x00000000 1c000000 02000000 00000400 00000000 ................
     51   0x00000010 54800408 14000000 00000000 00000000 T...............
     52   0x00000020 1c000000 02004d00 00000400 00000000 ......M.........
     53   0x00000030 68800408 16000000 00000000 00000000 h...............
     54 EOF
     55 
     56 testfiles testfile-zgabi32
     57 testrun_compare ${abs_top_builddir}/src/readelf -z -x.debug_aranges testfile-zgabi32 <<\EOF
     58 
     59 Hex dump of section [2] '.debug_aranges', 49 bytes (64 uncompressed) at offset 0x1c0:
     60   0x00000000 1c000000 02000000 00000400 00000000 ................
     61   0x00000010 54800408 14000000 00000000 00000000 T...............
     62   0x00000020 1c000000 02004d00 00000400 00000000 ......M.........
     63   0x00000030 68800408 16000000 00000000 00000000 h...............
     64 EOF
     65 
     66 exit 0
     67