]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gold/testsuite/pr26936.sh
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / gold / testsuite / pr26936.sh
CommitLineData
8ca751ee
L
1#!/bin/sh
2
3# pr26936.sh -- Tests for relocations in debug sections against linkonce
4# and comdat sections.
5
fd67aa11 6# Copyright (C) 2020-2024 Free Software Foundation, Inc.
8ca751ee
L
7
8# This file is part of gold.
9
10# This program is free software; you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation; either version 3 of the License, or
13# (at your option) any later version.
14
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19
20# You should have received a copy of the GNU General Public License
21# along with this program; if not, write to the Free Software
22# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
23# MA 02110-1301, USA.
24
25set -e
26
27check()
28{
67d1991b 29 number_of_occurrence=`$EGREP "$2" ./$1 -o| wc -l`
8ca751ee
L
30 if [ $number_of_occurrence != $3 ]
31 then
32 echo "$1: \"$2\" $3: Failed"
33 status=1
34 fi
35}
36
37status=0
38check pr26936a.stdout "^pr26936a.s +6 +0x10108 +x" 1
39check pr26936a.stdout "^pr26936b.s +5 +0x10109 +x" 1
40check pr26936a.stdout "^pr26936b.s +11 +0x10108 +x" 1
41check pr26936a.stdout "^pr26936c.s +6 +0x10108 +x" 1
42check pr26936a.stdout "^ +0+10108 0+1" 3
43check pr26936a.stdout "^ +0+10109 0+1" 1
44check pr26936a.stdout "^ +0+ 0+10109 0+1010a" 1
45check pr26936a.stdout "^ +0+ 0+10108 0+10109" 1
46check pr26936b.stdout "^pr26936d.s +6 +0x10108 +x" 1
47check pr26936b.stdout "^pr26936b.s +5 +0x10109 +x" 1
48check pr26936b.stdout "^pr26936b.s +11 +0x10108 +x" 1
49check pr26936b.stdout "^pr26936c.s +6 +0x10108 +x" 1
50check pr26936b.stdout "^ +0+10108 0+1" 3
51check pr26936b.stdout "^ +0+10109 0+1" 1
52check pr26936b.stdout "^ +0+ 0+10109 0+1010a" 1
53check pr26936b.stdout "^ +0+ 0+10108 0+10109" 1
54
55exit $status