Home | History | Annotate | Download | only in tests
      1 #! /bin/sh
      2 # Copyright (C) 2005 Red Hat, Inc.
      3 # This file is part of elfutils.
      4 #
      5 # 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.
      9 #
     10 # elfutils is distributed in the hope that it will be useful, but
     11 # WITHOUT ANY WARRANTY; without even the implied warranty of
     12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13 # GNU General Public License for more details.
     14 #
     15 # 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/>.
     17 
     18 . $srcdir/test-subr.sh
     19 
     20 testfiles testfile testfile11 testfile22 testfile24 \
     21 	  testfile25 testfile3 testfile4 testfile5 testfile6
     22 
     23 testrun_compare ${abs_builddir}/find-prologues -e testfile <<\EOF
     24 main             0x000000000804842c 0x0000000008048432
     25 bar              0x000000000804845c 0x000000000804845f
     26 foo              0x0000000008048468 0x000000000804846b
     27 EOF
     28 
     29 testrun_compare ${abs_builddir}/find-prologues -e testfile11 <<\EOF
     30 main             0x00000000080489b8 0x00000000080489cd
     31 gnu_obj_2        0x0000000008048c9e 0x0000000008048ca4
     32 gnu_obj_3        0x0000000008048cd8 0x0000000008048cde
     33 gnu_obj_2        0x0000000008048cf4 0x0000000008048cfa
     34 ~invalid_argument 0x0000000008048d2e 0x0000000008048d34
     35 gnu_obj_1        0x0000000008048d62 0x0000000008048d65
     36 gnu_obj_1        0x0000000008048d8a 0x0000000008048d8d
     37 ~invalid_argument 0x0000000008048db2 0x0000000008048db8
     38 EOF
     39 
     40 testrun_compare ${abs_builddir}/find-prologues -e testfile22 <<\EOF
     41 function         0x0000000008048348 0x000000000804834e
     42 main             0x000000000804835b 0x0000000008048377
     43 EOF
     44 
     45 testrun_compare ${abs_builddir}/find-prologues -e testfile24 <<\EOF
     46 incr             0x0000000008048348 0x000000000804834e
     47 main             0x0000000008048354 0x0000000008048360
     48 EOF
     49 
     50 testrun_compare ${abs_builddir}/find-prologues -e testfile25 <<\EOF
     51 incr             0x0000000008048348 0x000000000804834c
     52 EOF
     53 
     54 testrun_compare ${abs_builddir}/find-prologues -e testfile3 <<\EOF
     55 main             0x000000000804842c 0x0000000008048433
     56 bar              0x0000000008048458 0x000000000804845b
     57 foo              0x0000000008048464 0x0000000008048467
     58 EOF
     59 
     60 testrun_compare ${abs_builddir}/find-prologues -e testfile4 <<\EOF
     61 get              0x00000000080493fc 0x0000000008049402
     62 main             0x0000000008049498 0x000000000804949e
     63 a                0x000000000804d85c 0x000000000804d85c
     64 __tfPCc          0x000000000804d86c 0x000000000804d872
     65 __tfCc           0x000000000804d8a4 0x000000000804d8a4
     66 EOF
     67 
     68 testrun_compare ${abs_builddir}/find-prologues -e testfile5 <<\EOF
     69 bar              0x000000000804842c 0x000000000804842f
     70 foo              0x0000000008048438 0x000000000804843b
     71 main             0x0000000008048444 0x000000000804844a
     72 EOF
     73 
     74 testrun_compare ${abs_builddir}/find-prologues -e testfile6 <<\EOF
     75 main             0x00000000080489b8 0x00000000080489cd
     76 gnu_obj_2        0x0000000008048c9e 0x0000000008048ca4
     77 gnu_obj_3        0x0000000008048cd8 0x0000000008048cde
     78 gnu_obj_2        0x0000000008048cf4 0x0000000008048cfa
     79 ~invalid_argument 0x0000000008048d2e 0x0000000008048d34
     80 gnu_obj_1        0x0000000008048d62 0x0000000008048d65
     81 gnu_obj_1        0x0000000008048d8a 0x0000000008048d8d
     82 ~invalid_argument 0x0000000008048db2 0x0000000008048db8
     83 EOF
     84 
     85 exit 0
     86