1da0c48c4Sopenharmony_ci#! /bin/sh
2da0c48c4Sopenharmony_ci# Copyright (C) 2005 Red Hat, Inc.
3da0c48c4Sopenharmony_ci# This file is part of elfutils.
4da0c48c4Sopenharmony_ci#
5da0c48c4Sopenharmony_ci# This file is free software; you can redistribute it and/or modify
6da0c48c4Sopenharmony_ci# it under the terms of the GNU General Public License as published by
7da0c48c4Sopenharmony_ci# the Free Software Foundation; either version 3 of the License, or
8da0c48c4Sopenharmony_ci# (at your option) any later version.
9da0c48c4Sopenharmony_ci#
10da0c48c4Sopenharmony_ci# elfutils is distributed in the hope that it will be useful, but
11da0c48c4Sopenharmony_ci# WITHOUT ANY WARRANTY; without even the implied warranty of
12da0c48c4Sopenharmony_ci# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13da0c48c4Sopenharmony_ci# GNU General Public License for more details.
14da0c48c4Sopenharmony_ci#
15da0c48c4Sopenharmony_ci# You should have received a copy of the GNU General Public License
16da0c48c4Sopenharmony_ci# along with this program.  If not, see <http://www.gnu.org/licenses/>.
17da0c48c4Sopenharmony_ci
18da0c48c4Sopenharmony_ci. $srcdir/test-subr.sh
19da0c48c4Sopenharmony_ci
20da0c48c4Sopenharmony_citestfiles testfile testfile11 testfile22 testfile24 \
21da0c48c4Sopenharmony_ci	  testfile25 testfile3 testfile4 testfile5 testfile6
22da0c48c4Sopenharmony_ci
23da0c48c4Sopenharmony_citestrun_compare ${abs_builddir}/find-prologues -e testfile <<\EOF
24da0c48c4Sopenharmony_cimain             0x000000000804842c 0x0000000008048432
25da0c48c4Sopenharmony_cibar              0x000000000804845c 0x000000000804845f
26da0c48c4Sopenharmony_cifoo              0x0000000008048468 0x000000000804846b
27da0c48c4Sopenharmony_ciEOF
28da0c48c4Sopenharmony_ci
29da0c48c4Sopenharmony_citestrun_compare ${abs_builddir}/find-prologues -e testfile11 <<\EOF
30da0c48c4Sopenharmony_cimain             0x00000000080489b8 0x00000000080489cd
31da0c48c4Sopenharmony_cignu_obj_2        0x0000000008048c9e 0x0000000008048ca4
32da0c48c4Sopenharmony_cignu_obj_3        0x0000000008048cd8 0x0000000008048cde
33da0c48c4Sopenharmony_cignu_obj_2        0x0000000008048cf4 0x0000000008048cfa
34da0c48c4Sopenharmony_ci~invalid_argument 0x0000000008048d2e 0x0000000008048d34
35da0c48c4Sopenharmony_cignu_obj_1        0x0000000008048d62 0x0000000008048d65
36da0c48c4Sopenharmony_cignu_obj_1        0x0000000008048d8a 0x0000000008048d8d
37da0c48c4Sopenharmony_ci~invalid_argument 0x0000000008048db2 0x0000000008048db8
38da0c48c4Sopenharmony_ciEOF
39da0c48c4Sopenharmony_ci
40da0c48c4Sopenharmony_citestrun_compare ${abs_builddir}/find-prologues -e testfile22 <<\EOF
41da0c48c4Sopenharmony_cifunction         0x0000000008048348 0x000000000804834e
42da0c48c4Sopenharmony_cimain             0x000000000804835b 0x0000000008048377
43da0c48c4Sopenharmony_ciEOF
44da0c48c4Sopenharmony_ci
45da0c48c4Sopenharmony_citestrun_compare ${abs_builddir}/find-prologues -e testfile24 <<\EOF
46da0c48c4Sopenharmony_ciincr             0x0000000008048348 0x000000000804834e
47da0c48c4Sopenharmony_cimain             0x0000000008048354 0x0000000008048360
48da0c48c4Sopenharmony_ciEOF
49da0c48c4Sopenharmony_ci
50da0c48c4Sopenharmony_citestrun_compare ${abs_builddir}/find-prologues -e testfile25 <<\EOF
51da0c48c4Sopenharmony_ciincr             0x0000000008048348 0x000000000804834c
52da0c48c4Sopenharmony_ciEOF
53da0c48c4Sopenharmony_ci
54da0c48c4Sopenharmony_citestrun_compare ${abs_builddir}/find-prologues -e testfile3 <<\EOF
55da0c48c4Sopenharmony_cimain             0x000000000804842c 0x0000000008048433
56da0c48c4Sopenharmony_cibar              0x0000000008048458 0x000000000804845b
57da0c48c4Sopenharmony_cifoo              0x0000000008048464 0x0000000008048467
58da0c48c4Sopenharmony_ciEOF
59da0c48c4Sopenharmony_ci
60da0c48c4Sopenharmony_citestrun_compare ${abs_builddir}/find-prologues -e testfile4 <<\EOF
61da0c48c4Sopenharmony_ciget              0x00000000080493fc 0x0000000008049402
62da0c48c4Sopenharmony_cimain             0x0000000008049498 0x000000000804949e
63da0c48c4Sopenharmony_cia                0x000000000804d85c 0x000000000804d85c
64da0c48c4Sopenharmony_ci__tfPCc          0x000000000804d86c 0x000000000804d872
65da0c48c4Sopenharmony_ci__tfCc           0x000000000804d8a4 0x000000000804d8a4
66da0c48c4Sopenharmony_ciEOF
67da0c48c4Sopenharmony_ci
68da0c48c4Sopenharmony_citestrun_compare ${abs_builddir}/find-prologues -e testfile5 <<\EOF
69da0c48c4Sopenharmony_cibar              0x000000000804842c 0x000000000804842f
70da0c48c4Sopenharmony_cifoo              0x0000000008048438 0x000000000804843b
71da0c48c4Sopenharmony_cimain             0x0000000008048444 0x000000000804844a
72da0c48c4Sopenharmony_ciEOF
73da0c48c4Sopenharmony_ci
74da0c48c4Sopenharmony_citestrun_compare ${abs_builddir}/find-prologues -e testfile6 <<\EOF
75da0c48c4Sopenharmony_cimain             0x00000000080489b8 0x00000000080489cd
76da0c48c4Sopenharmony_cignu_obj_2        0x0000000008048c9e 0x0000000008048ca4
77da0c48c4Sopenharmony_cignu_obj_3        0x0000000008048cd8 0x0000000008048cde
78da0c48c4Sopenharmony_cignu_obj_2        0x0000000008048cf4 0x0000000008048cfa
79da0c48c4Sopenharmony_ci~invalid_argument 0x0000000008048d2e 0x0000000008048d34
80da0c48c4Sopenharmony_cignu_obj_1        0x0000000008048d62 0x0000000008048d65
81da0c48c4Sopenharmony_cignu_obj_1        0x0000000008048d8a 0x0000000008048d8d
82da0c48c4Sopenharmony_ci~invalid_argument 0x0000000008048db2 0x0000000008048db8
83da0c48c4Sopenharmony_ciEOF
84da0c48c4Sopenharmony_ci
85da0c48c4Sopenharmony_ciexit 0
86