]> git.ipfire.org Git - thirdparty/glibc.git/blame - elf/vismod2.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / elf / vismod2.c
CommitLineData
b168057a 1/* Copyright (C) 2000-2015 Free Software Foundation, Inc.
eec8ef5a
UD
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
eec8ef5a
UD
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 12 Lesser General Public License for more details.
eec8ef5a 13
41bdb6e2 14 You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
eec8ef5a 17
3d8e9510 18#include <stdlib.h>
715ed1e9 19#include "vismod.h"
3d8e9510 20
eec8ef5a
UD
21int
22protlocal (void)
23{
24 return 0x40;
25}
26asm (".protected protlocal");
27
28
29int
30calllocal2 (void)
31{
32 return protlocal () + 0x100;
33}
34
35int
36(*getlocal2 (void)) (void)
37{
38 return protlocal;
39}
40
41int
42protinmod (void)
43{
44 return 0x4000;
45}
46asm (".protected protinmod");
47
48int
49callinmod2 (void)
50{
51 return protinmod () + 0x10000;
52}
53
54int
55(*getinmod2 (void)) (void)
56{
57 return protinmod;
58}
59
60int
61protitcpt (void)
62{
63 return 0x400000;
64}
65asm (".protected protitcpt");
66
67int
68callitcpt2 (void)
69{
70 return protitcpt () + 0x1000000;
71}
72
73int
74(*getitcpt2 (void)) (void)
75{
76 return protitcpt;
77}
78
79const char *protvarlocal = __FILE__;
80asm (".protected protvarlocal");
81
8a3e01b9 82const char **
eec8ef5a
UD
83getvarlocal2 (void)
84{
8a3e01b9 85 return &protvarlocal;
eec8ef5a
UD
86}
87
88const char *protvarinmod = __FILE__;
89asm (".protected protvarinmod");
90
8a3e01b9 91const char **
eec8ef5a
UD
92getvarinmod2 (void)
93{
8a3e01b9 94 return &protvarinmod;
eec8ef5a
UD
95}
96
97const char *protvaritcpt = __FILE__;
98asm (".protected protvaritcpt");
99
8a3e01b9 100const char **
eec8ef5a
UD
101getvaritcpt2 (void)
102{
8a3e01b9 103 return &protvaritcpt;
eec8ef5a
UD
104}
105
106/* We must never call these functions. */
107int
108callitcpt3 (void)
109{
110 abort ();
111}
112
113int
114(*getitcpt3 (void)) (void)
115{
116 abort ();
117}
118
8a3e01b9 119const char **
eec8ef5a
UD
120getvaritcpt3 (void)
121{
122 abort ();
123}