blob: eddc9ee7ed22ecb6f876625305e782ec8a737610 [file] [log] [blame]
Roland McGrath07d4f2f2005-10-28 06:56:24 +00001#! /bin/sh
2# Copyright (C) 2005 Red Hat, Inc.
Ulrich Drepper361df7d2006-04-04 21:38:57 +00003# This file is part of Red Hat elfutils.
Roland McGrath07d4f2f2005-10-28 06:56:24 +00004#
Ulrich Drepper361df7d2006-04-04 21:38:57 +00005# 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.
Roland McGrath07d4f2f2005-10-28 06:56:24 +00008#
Ulrich Drepper361df7d2006-04-04 21:38:57 +00009# 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,
Ulrich Drepper1e9ef502006-04-04 22:29:06 +000016# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
Ulrich Drepper361df7d2006-04-04 21:38:57 +000017#
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
Roland McGrath1b8b4462005-11-16 01:33:38 +000026. $srcdir/test-subr.sh
Roland McGrath07d4f2f2005-10-28 06:56:24 +000027
Roland McGrath1b8b4462005-11-16 01:33:38 +000028testfiles testfile testfile11 testfile22 testfile24 \
29 testfile25 testfile3 testfile4 testfile5 testfile6
Roland McGrath07d4f2f2005-10-28 06:56:24 +000030
Roland McGrath1b8b4462005-11-16 01:33:38 +000031testrun_compare ./find-prologues -e testfile <<\EOF
Roland McGrath07d4f2f2005-10-28 06:56:24 +000032main 0x000000000804842c 0x0000000008048432
33bar 0x000000000804845c 0x000000000804845f
34foo 0x0000000008048468 0x000000000804846b
Roland McGrath1b8b4462005-11-16 01:33:38 +000035EOF
36
37testrun_compare ./find-prologues -e testfile11 <<\EOF
Roland McGrath07d4f2f2005-10-28 06:56:24 +000038main 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
Roland McGrath1b8b4462005-11-16 01:33:38 +000048testrun_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