1#! /bin/sh 2# Copyright (C) 2005 Red Hat, Inc. 3# This file is part of Red Hat elfutils. 4# 5# Red Hat elfutils is free software; you can redistribute it and/or modify 6# it under the terms of the GNU General Public License as published by the 7# Free Software Foundation; version 2 of the License. 8# 9# Red Hat elfutils is distributed in the hope that it will be useful, but 10# WITHOUT ANY WARRANTY; without even the implied warranty of 11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12# General Public License for more details. 13# 14# You should have received a copy of the GNU General Public License along 15# with Red Hat elfutils; if not, write to the Free Software Foundation, 16# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. 17# 18# Red Hat elfutils is an included package of the Open Invention Network. 19# An included package of the Open Invention Network is a package for which 20# Open Invention Network licensees cross-license their patents. No patent 21# license is granted, either expressly or impliedly, by designation as an 22# included package. Should you wish to participate in the Open Invention 23# Network licensing program, please visit www.openinventionnetwork.com 24# <http://www.openinventionnetwork.com>. 25 26. $srcdir/test-subr.sh 27 28testfiles testfile testfile11 testfile22 testfile24 \ 29 testfile25 testfile3 testfile4 testfile5 testfile6 30 31testrun_compare ./find-prologues -e testfile <<\EOF 32main 0x000000000804842c 0x0000000008048432 33bar 0x000000000804845c 0x000000000804845f 34foo 0x0000000008048468 0x000000000804846b 35EOF 36 37testrun_compare ./find-prologues -e testfile11 <<\EOF 38main 0x00000000080489b8 0x00000000080489cd 39gnu_obj_2 0x0000000008048c9e 0x0000000008048ca4 40gnu_obj_3 0x0000000008048cd8 0x0000000008048cde 41gnu_obj_2 0x0000000008048cf4 0x0000000008048cfa 42~invalid_argument 0x0000000008048d2e 0x0000000008048d34 43gnu_obj_1 0x0000000008048d62 0x0000000008048d65 44gnu_obj_1 0x0000000008048d8a 0x0000000008048d8d 45~invalid_argument 0x0000000008048db2 0x0000000008048db8 46EOF 47 48testrun_compare ./find-prologues -e testfile22 <<\EOF 49function 0x0000000008048348 0x000000000804834e 50main 0x000000000804835b 0x0000000008048377 51EOF 52 53testrun_compare ./find-prologues -e testfile24 <<\EOF 54incr 0x0000000008048348 0x000000000804834e 55main 0x0000000008048354 0x0000000008048360 56EOF 57 58testrun_compare ./find-prologues -e testfile25 <<\EOF 59incr 0x0000000008048348 0x000000000804834c 60EOF 61 62testrun_compare ./find-prologues -e testfile3 <<\EOF 63main 0x000000000804842c 0x0000000008048433 64bar 0x0000000008048458 0x000000000804845b 65foo 0x0000000008048464 0x0000000008048467 66EOF 67 68testrun_compare ./find-prologues -e testfile4 <<\EOF 69get 0x00000000080493fc 0x0000000008049402 70main 0x0000000008049498 0x000000000804949e 71a 0x000000000804d85c 0x000000000804d85c 72__tfPCc 0x000000000804d86c 0x000000000804d872 73__tfCc 0x000000000804d8a4 0x000000000804d8a4 74EOF 75 76testrun_compare ./find-prologues -e testfile5 <<\EOF 77bar 0x000000000804842c 0x000000000804842f 78foo 0x0000000008048438 0x000000000804843b 79main 0x0000000008048444 0x000000000804844a 80EOF 81 82testrun_compare ./find-prologues -e testfile6 <<\EOF 83main 0x00000000080489b8 0x00000000080489cd 84gnu_obj_2 0x0000000008048c9e 0x0000000008048ca4 85gnu_obj_3 0x0000000008048cd8 0x0000000008048cde 86gnu_obj_2 0x0000000008048cf4 0x0000000008048cfa 87~invalid_argument 0x0000000008048d2e 0x0000000008048d34 88gnu_obj_1 0x0000000008048d62 0x0000000008048d65 89gnu_obj_1 0x0000000008048d8a 0x0000000008048d8d 90~invalid_argument 0x0000000008048db2 0x0000000008048db8 91EOF 92 93exit 0 94