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 22testfiles testfile-zgnu64 23testrun_compare ${abs_top_builddir}/tests/elfgetzdata read testfile-zgnu64 <<\EOF 241: .text, NOT compressed 252: .zdebug_aranges, GNU compressed, size: 60 263: .zdebug_info, GNU compressed, size: aa 274: .debug_abbrev, NOT compressed 285: .zdebug_line, GNU compressed, size: 8d 296: .shstrtab, NOT compressed 307: .symtab, NOT compressed 318: .strtab, NOT compressed 32EOF 33 34testrun_compare ${abs_top_builddir}/tests/elfgetzdata mmap testfile-zgnu64 <<\EOF 351: .text, NOT compressed 362: .zdebug_aranges, GNU compressed, size: 60 373: .zdebug_info, GNU compressed, size: aa 384: .debug_abbrev, NOT compressed 395: .zdebug_line, GNU compressed, size: 8d 406: .shstrtab, NOT compressed 417: .symtab, NOT compressed 428: .strtab, NOT compressed 43EOF 44 45testfiles testfile-zgnu64be 46testrun_compare ${abs_top_builddir}/tests/elfgetzdata read testfile-zgnu64be <<\EOF 471: .text, NOT compressed 482: .eh_frame, NOT compressed 493: .zdebug_aranges, GNU compressed, size: 60 504: .zdebug_info, GNU compressed, size: 7e 515: .debug_abbrev, NOT compressed 526: .zdebug_line, GNU compressed, size: 8d 537: .shstrtab, NOT compressed 548: .symtab, NOT compressed 559: .strtab, NOT compressed 56EOF 57 58testrun_compare ${abs_top_builddir}/tests/elfgetzdata mmap testfile-zgnu64be <<\EOF 591: .text, NOT compressed 602: .eh_frame, NOT compressed 613: .zdebug_aranges, GNU compressed, size: 60 624: .zdebug_info, GNU compressed, size: 7e 635: .debug_abbrev, NOT compressed 646: .zdebug_line, GNU compressed, size: 8d 657: .shstrtab, NOT compressed 668: .symtab, NOT compressed 679: .strtab, NOT compressed 68EOF 69 70testfiles testfile-zgabi64 71testrun_compare ${abs_top_builddir}/tests/elfgetzdata read testfile-zgabi64 <<\EOF 721: .text, NOT compressed 732: .debug_aranges, ELF compressed, size: 60 743: .debug_info, ELF compressed, size: aa 754: .debug_abbrev, NOT compressed 765: .debug_line, ELF compressed, size: 8d 776: .shstrtab, NOT compressed 787: .symtab, NOT compressed 798: .strtab, NOT compressed 80EOF 81 82testrun_compare ${abs_top_builddir}/tests/elfgetzdata mmap testfile-zgabi64 <<\EOF 831: .text, NOT compressed 842: .debug_aranges, ELF compressed, size: 60 853: .debug_info, ELF compressed, size: aa 864: .debug_abbrev, NOT compressed 875: .debug_line, ELF compressed, size: 8d 886: .shstrtab, NOT compressed 897: .symtab, NOT compressed 908: .strtab, NOT compressed 91EOF 92 93testfiles testfile-zgabi64be 94testrun_compare ${abs_top_builddir}/tests/elfgetzdata read testfile-zgabi64be <<\EOF 951: .text, NOT compressed 962: .eh_frame, NOT compressed 973: .debug_aranges, ELF compressed, size: 60 984: .debug_info, ELF compressed, size: 7e 995: .debug_abbrev, NOT compressed 1006: .debug_line, ELF compressed, size: 8d 1017: .shstrtab, NOT compressed 1028: .symtab, NOT compressed 1039: .strtab, NOT compressed 104EOF 105 106testrun_compare ${abs_top_builddir}/tests/elfgetzdata mmap testfile-zgabi64be <<\EOF 1071: .text, NOT compressed 1082: .eh_frame, NOT compressed 1093: .debug_aranges, ELF compressed, size: 60 1104: .debug_info, ELF compressed, size: 7e 1115: .debug_abbrev, NOT compressed 1126: .debug_line, ELF compressed, size: 8d 1137: .shstrtab, NOT compressed 1148: .symtab, NOT compressed 1159: .strtab, NOT compressed 116EOF 117 118testfiles testfile-zgnu32 119testrun_compare ${abs_top_builddir}/tests/elfgetzdata read testfile-zgnu32 <<\EOF 1201: .text, NOT compressed 1212: .zdebug_aranges, GNU compressed, size: 40 1223: .zdebug_info, GNU compressed, size: 9a 1234: .debug_abbrev, NOT compressed 1245: .zdebug_line, GNU compressed, size: 85 1256: .shstrtab, NOT compressed 1267: .symtab, NOT compressed 1278: .strtab, NOT compressed 128EOF 129 130testrun_compare ${abs_top_builddir}/tests/elfgetzdata mmap testfile-zgnu32 <<\EOF 1311: .text, NOT compressed 1322: .zdebug_aranges, GNU compressed, size: 40 1333: .zdebug_info, GNU compressed, size: 9a 1344: .debug_abbrev, NOT compressed 1355: .zdebug_line, GNU compressed, size: 85 1366: .shstrtab, NOT compressed 1377: .symtab, NOT compressed 1388: .strtab, NOT compressed 139EOF 140 141testfiles testfile-zgnu32be 142testrun_compare ${abs_top_builddir}/tests/elfgetzdata read testfile-zgnu32be <<\EOF 1431: .text, NOT compressed 1442: .eh_frame, NOT compressed 1453: .zdebug_aranges, GNU compressed, size: 40 1464: .zdebug_info, GNU compressed, size: 6e 1475: .debug_abbrev, NOT compressed 1486: .zdebug_line, GNU compressed, size: 85 1497: .shstrtab, NOT compressed 1508: .symtab, NOT compressed 1519: .strtab, NOT compressed 152EOF 153 154testrun_compare ${abs_top_builddir}/tests/elfgetzdata mmap testfile-zgnu32be <<\EOF 1551: .text, NOT compressed 1562: .eh_frame, NOT compressed 1573: .zdebug_aranges, GNU compressed, size: 40 1584: .zdebug_info, GNU compressed, size: 6e 1595: .debug_abbrev, NOT compressed 1606: .zdebug_line, GNU compressed, size: 85 1617: .shstrtab, NOT compressed 1628: .symtab, NOT compressed 1639: .strtab, NOT compressed 164EOF 165 166testfiles testfile-zgabi32 167testrun_compare ${abs_top_builddir}/tests/elfgetzdata read testfile-zgabi32 <<\EOF 1681: .text, NOT compressed 1692: .debug_aranges, ELF compressed, size: 40 1703: .debug_info, ELF compressed, size: 9a 1714: .debug_abbrev, NOT compressed 1725: .debug_line, ELF compressed, size: 85 1736: .shstrtab, NOT compressed 1747: .symtab, NOT compressed 1758: .strtab, NOT compressed 176EOF 177 178testrun_compare ${abs_top_builddir}/tests/elfgetzdata mmap testfile-zgabi32 <<\EOF 1791: .text, NOT compressed 1802: .debug_aranges, ELF compressed, size: 40 1813: .debug_info, ELF compressed, size: 9a 1824: .debug_abbrev, NOT compressed 1835: .debug_line, ELF compressed, size: 85 1846: .shstrtab, NOT compressed 1857: .symtab, NOT compressed 1868: .strtab, NOT compressed 187EOF 188 189testfiles testfile-zgabi32be 190testrun_compare ${abs_top_builddir}/tests/elfgetzdata read testfile-zgabi32be <<\EOF 1911: .text, NOT compressed 1922: .eh_frame, NOT compressed 1933: .debug_aranges, ELF compressed, size: 40 1944: .debug_info, ELF compressed, size: 6e 1955: .debug_abbrev, NOT compressed 1966: .debug_line, ELF compressed, size: 85 1977: .shstrtab, NOT compressed 1988: .symtab, NOT compressed 1999: .strtab, NOT compressed 200EOF 201 202testrun_compare ${abs_top_builddir}/tests/elfgetzdata mmap testfile-zgabi32be <<\EOF 2031: .text, NOT compressed 2042: .eh_frame, NOT compressed 2053: .debug_aranges, ELF compressed, size: 40 2064: .debug_info, ELF compressed, size: 6e 2075: .debug_abbrev, NOT compressed 2086: .debug_line, ELF compressed, size: 85 2097: .shstrtab, NOT compressed 2108: .symtab, NOT compressed 2119: .strtab, NOT compressed 212EOF 213 214exit 0 215