blob: 80da0081ac62a715b43337722d43e6d69d222c2d [file] [log] [blame]
Roland McGrathe4c22ea2007-10-23 13:07:39 +00001#! /bin/sh
Roland McGrath19a8e4d2009-04-21 15:44:07 -07002# Copyright (C) 2007-2009 Red Hat, Inc.
Mark Wielaardde2ed972012-06-05 17:15:16 +02003# This file is part of elfutils.
Roland McGrathe4c22ea2007-10-23 13:07:39 +00004#
Mark Wielaardde2ed972012-06-05 17:15:16 +02005# 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.
Roland McGrathe4c22ea2007-10-23 13:07:39 +00009#
Mark Wielaardde2ed972012-06-05 17:15:16 +020010# elfutils is distributed in the hope that it will be useful, but
Roland McGrathe4c22ea2007-10-23 13:07:39 +000011# WITHOUT ANY WARRANTY; without even the implied warranty of
Mark Wielaardde2ed972012-06-05 17:15:16 +020012# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
Roland McGrathe4c22ea2007-10-23 13:07:39 +000014#
Mark Wielaardde2ed972012-06-05 17:15:16 +020015# 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/>.
Roland McGrathe4c22ea2007-10-23 13:07:39 +000017
18. $srcdir/test-subr.sh
19
Roland McGrath19a8e4d2009-04-21 15:44:07 -070020testfiles testfile43 testfile50
Roland McGrathe4c22ea2007-10-23 13:07:39 +000021
Mark Wielaard86be7922013-04-26 23:44:25 +020022testrun_compare ${abs_builddir}/dwfl-addr-sect -e testfile43 0x64 0x8 0x98 <<\EOF
Roland McGrathe4c22ea2007-10-23 13:07:39 +000023address 0x64 => module "" section 4 + 0
24address 0x8 => module "" section 1 + 0x8
25address 0x98 => module "" section 7 + 0
26EOF
27
Mark Wielaard86be7922013-04-26 23:44:25 +020028testrun_compare ${abs_builddir}/dwfl-addr-sect -e testfile50 0x1 <<\EOF
Roland McGrath19a8e4d2009-04-21 15:44:07 -070029address 0x1 => module "" section 1 + 0x1
30EOF
31
Roland McGrathe4c22ea2007-10-23 13:07:39 +000032exit 0