aboutsummaryrefslogtreecommitdiff
path: root/elf/tst-hash-collision3-mod.c
blob: 721bc2ab7e01c9a27a73b4502793bb3bd63d6f2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/* Test ELF symbol version hash collisions: shared object.
   Copyright (C) 2024-2025 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the GNU C Library; if not, see
   <https://www.gnu.org/licenses/>.  */

int
foo1 (void)
{
  return 1;
}

int
foo2 (void)
{
  return 2;
}

int
foo3 (void)
{
  return 3;
}

int
foo4 (void)
{
  return 4;
}

int
foo5 (void)
{
  return 5;
}

int
bar1 (void)
{
  return 6;
}

int
bar2 (void)
{
  return 7;
}

int
bar3 (void)
{
  return 8;
}

int
bar4 (void)
{
  return 9;
}

int
bar5 (void)
{
  return 10;
}

symbol_version (foo1, foo, Hxxxyoa);
symbol_version (foo2, foo, HxxxypQ);
symbol_version (foo3, foo, HxxxyqA);
symbol_version (foo4, foo, HxxxzaA);
symbol_version (foo5, foo, Hxxxz_a);
symbol_version (bar1, bar, Hxxxyob);
symbol_version (bar2, bar, HxxxypR);
symbol_version (bar3, bar, HxxxyqB);
symbol_version (bar4, bar, HxxxzaB);
symbol_version (bar5, bar, Hxxxz_b);