Roland McGrath | 07d4f2f | 2005-10-28 06:56:24 +0000 | [diff] [blame] | 1 | #! /bin/sh |
| 2 | # Copyright (C) 2005 Red Hat, Inc. |
Ulrich Drepper | 361df7d | 2006-04-04 21:38:57 +0000 | [diff] [blame] | 3 | # This file is part of Red Hat elfutils. |
Roland McGrath | 07d4f2f | 2005-10-28 06:56:24 +0000 | [diff] [blame] | 4 | # |
Ulrich Drepper | 361df7d | 2006-04-04 21:38:57 +0000 | [diff] [blame] | 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. |
Roland McGrath | 07d4f2f | 2005-10-28 06:56:24 +0000 | [diff] [blame] | 8 | # |
Ulrich Drepper | 361df7d | 2006-04-04 21:38:57 +0000 | [diff] [blame] | 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, |
Ulrich Drepper | 1e9ef50 | 2006-04-04 22:29:06 +0000 | [diff] [blame] | 16 | # Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. |
Ulrich Drepper | 361df7d | 2006-04-04 21:38:57 +0000 | [diff] [blame] | 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 | |
Roland McGrath | 1b8b446 | 2005-11-16 01:33:38 +0000 | [diff] [blame] | 26 | . $srcdir/test-subr.sh |
Roland McGrath | 07d4f2f | 2005-10-28 06:56:24 +0000 | [diff] [blame] | 27 | |
Roland McGrath | 1b8b446 | 2005-11-16 01:33:38 +0000 | [diff] [blame] | 28 | testfiles testfile testfile11 testfile22 testfile24 \ |
| 29 | testfile25 testfile3 testfile4 testfile5 testfile6 |
Roland McGrath | 07d4f2f | 2005-10-28 06:56:24 +0000 | [diff] [blame] | 30 | |
Roland McGrath | 1b8b446 | 2005-11-16 01:33:38 +0000 | [diff] [blame] | 31 | testrun_compare ./find-prologues -e testfile <<\EOF |
Roland McGrath | 07d4f2f | 2005-10-28 06:56:24 +0000 | [diff] [blame] | 32 | main 0x000000000804842c 0x0000000008048432 |
| 33 | bar 0x000000000804845c 0x000000000804845f |
| 34 | foo 0x0000000008048468 0x000000000804846b |
Roland McGrath | 1b8b446 | 2005-11-16 01:33:38 +0000 | [diff] [blame] | 35 | EOF |
| 36 | |
| 37 | testrun_compare ./find-prologues -e testfile11 <<\EOF |
Roland McGrath | 07d4f2f | 2005-10-28 06:56:24 +0000 | [diff] [blame] | 38 | main 0x00000000080489b8 0x00000000080489cd |
| 39 | gnu_obj_2 0x0000000008048c9e 0x0000000008048ca4 |
| 40 | gnu_obj_3 0x0000000008048cd8 0x0000000008048cde |
| 41 | gnu_obj_2 0x0000000008048cf4 0x0000000008048cfa |
| 42 | ~invalid_argument 0x0000000008048d2e 0x0000000008048d34 |
| 43 | gnu_obj_1 0x0000000008048d62 0x0000000008048d65 |
| 44 | gnu_obj_1 0x0000000008048d8a 0x0000000008048d8d |
| 45 | ~invalid_argument 0x0000000008048db2 0x0000000008048db8 |
| 46 | EOF |
| 47 | |
Roland McGrath | 1b8b446 | 2005-11-16 01:33:38 +0000 | [diff] [blame] | 48 | testrun_compare ./find-prologues -e testfile22 <<\EOF |
| 49 | function 0x0000000008048348 0x000000000804834e |
| 50 | main 0x000000000804835b 0x0000000008048377 |
| 51 | EOF |
| 52 | |
| 53 | testrun_compare ./find-prologues -e testfile24 <<\EOF |
| 54 | incr 0x0000000008048348 0x000000000804834e |
| 55 | main 0x0000000008048354 0x0000000008048360 |
| 56 | EOF |
| 57 | |
| 58 | testrun_compare ./find-prologues -e testfile25 <<\EOF |
| 59 | incr 0x0000000008048348 0x000000000804834c |
| 60 | EOF |
| 61 | |
| 62 | testrun_compare ./find-prologues -e testfile3 <<\EOF |
| 63 | main 0x000000000804842c 0x0000000008048433 |
| 64 | bar 0x0000000008048458 0x000000000804845b |
| 65 | foo 0x0000000008048464 0x0000000008048467 |
| 66 | EOF |
| 67 | |
| 68 | testrun_compare ./find-prologues -e testfile4 <<\EOF |
| 69 | get 0x00000000080493fc 0x0000000008049402 |
| 70 | main 0x0000000008049498 0x000000000804949e |
| 71 | a 0x000000000804d85c 0x000000000804d85c |
| 72 | __tfPCc 0x000000000804d86c 0x000000000804d872 |
| 73 | __tfCc 0x000000000804d8a4 0x000000000804d8a4 |
| 74 | EOF |
| 75 | |
| 76 | testrun_compare ./find-prologues -e testfile5 <<\EOF |
| 77 | bar 0x000000000804842c 0x000000000804842f |
| 78 | foo 0x0000000008048438 0x000000000804843b |
| 79 | main 0x0000000008048444 0x000000000804844a |
| 80 | EOF |
| 81 | |
| 82 | testrun_compare ./find-prologues -e testfile6 <<\EOF |
| 83 | main 0x00000000080489b8 0x00000000080489cd |
| 84 | gnu_obj_2 0x0000000008048c9e 0x0000000008048ca4 |
| 85 | gnu_obj_3 0x0000000008048cd8 0x0000000008048cde |
| 86 | gnu_obj_2 0x0000000008048cf4 0x0000000008048cfa |
| 87 | ~invalid_argument 0x0000000008048d2e 0x0000000008048d34 |
| 88 | gnu_obj_1 0x0000000008048d62 0x0000000008048d65 |
| 89 | gnu_obj_1 0x0000000008048d8a 0x0000000008048d8d |
| 90 | ~invalid_argument 0x0000000008048db2 0x0000000008048db8 |
| 91 | EOF |
| 92 | |
| 93 | exit 0 |