Blame tests/run-elflint-test.sh

Packit 032894
#! /bin/sh
Packit 032894
# Copyright (C) 2005, 2007, 2008, 2015 Red Hat, Inc.
Packit 032894
# This file is part of elfutils.
Packit 032894
# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
Packit 032894
#
Packit 032894
# This file is free software; you can redistribute it and/or modify
Packit 032894
# it under the terms of the GNU General Public License as published by
Packit 032894
# the Free Software Foundation; either version 3 of the License, or
Packit 032894
# (at your option) any later version.
Packit 032894
#
Packit 032894
# elfutils is distributed in the hope that it will be useful, but
Packit 032894
# WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 032894
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 032894
# GNU General Public License for more details.
Packit 032894
#
Packit 032894
# You should have received a copy of the GNU General Public License
Packit 032894
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
Packit 032894
Packit 032894
. $srcdir/test-subr.sh
Packit 032894
Packit 032894
testfiles testfile18
Packit 032894
Packit 032894
testrun_compare ${abs_top_builddir}/src/elflint --gnu-ld testfile18 <<\EOF
Packit 032894
section [ 8] '.rela.dyn': relocation 1: copy relocation against symbol of type FUNC
Packit 032894
EOF
Packit 032894
Packit 032894
testfiles testfile32
Packit 032894
testrun ${abs_top_builddir}/src/elflint -q testfile32
Packit 032894
Packit 032894
testfiles testfile33
Packit 032894
testrun ${abs_top_builddir}/src/elflint -q testfile33
Packit 032894
Packit 032894
testfiles testfile42
Packit 032894
testrun ${abs_top_builddir}/src/elflint -q --gnu-ld testfile42
Packit 032894
Packit 032894
# Contains debuginfo, compress it, recheck
Packit 032894
tempfiles testfile42z
Packit 032894
testrun ${abs_top_builddir}/src/elfcompress -f -q -o testfile42z testfile42
Packit 032894
testrun ${abs_top_builddir}/src/elflint -q --gnu-ld testfile42z
Packit 032894
Packit 032894
testfiles testfile46
Packit 032894
testrun ${abs_top_builddir}/src/elflint -q testfile46
Packit 032894
Packit 032894
# see also run-readelf-d.sh
Packit 032894
testfiles testlib_dynseg.so
Packit 032894
testrun ${abs_top_builddir}/src/elflint -q --gnu-ld testlib_dynseg.so
Packit 032894
Packit 032894
# s390x has SHT_HASH with sh_entsize 8 (really should be 4, but see common.h)
Packit 032894
# This was wrongly checked when comparing .gnu.hash and .hash.
Packit 032894
# Simple "int main (int argc, char **argv) { return 0; }"
Packit 032894
# gcc -Xlinker --hash-style=both -o testfile-s390x-hash-both s390x-hash-both.c
Packit 032894
testfiles testfile-s390x-hash-both
Packit 032894
testrun ${abs_top_builddir}/src/elflint -q --gnu-ld testfile-s390x-hash-both
Packit 032894
Packit 032894
# Compress the symtab/strtab just because and recheck
Packit 032894
tempfiles testfile-s390x-hash-bothz
Packit 032894
testrun ${abs_top_builddir}/src/elfcompress -f -q --name='.s??tab' -o testfile-s390x-hash-bothz testfile-s390x-hash-both
Packit 032894
testrun ${abs_top_builddir}/src/elflint -q --gnu-ld testfile-s390x-hash-bothz
Packit 032894
Packit 032894
exit 0