Update copyright notices with scripts/update-copyrights
[glibc.git] / elf / vismod2.c
blob8f9adee979a124244e4edaa7afe9391d3e6e5463
1 /* Copyright (C) 2000-2014 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
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.
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
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
18 #include <stdlib.h>
19 #include "vismod.h"
21 int
22 protlocal (void)
24 return 0x40;
26 asm (".protected protlocal");
29 int
30 calllocal2 (void)
32 return protlocal () + 0x100;
35 int
36 (*getlocal2 (void)) (void)
38 return protlocal;
41 int
42 protinmod (void)
44 return 0x4000;
46 asm (".protected protinmod");
48 int
49 callinmod2 (void)
51 return protinmod () + 0x10000;
54 int
55 (*getinmod2 (void)) (void)
57 return protinmod;
60 int
61 protitcpt (void)
63 return 0x400000;
65 asm (".protected protitcpt");
67 int
68 callitcpt2 (void)
70 return protitcpt () + 0x1000000;
73 int
74 (*getitcpt2 (void)) (void)
76 return protitcpt;
79 const char *protvarlocal = __FILE__;
80 asm (".protected protvarlocal");
82 const char **
83 getvarlocal2 (void)
85 return &protvarlocal;
88 const char *protvarinmod = __FILE__;
89 asm (".protected protvarinmod");
91 const char **
92 getvarinmod2 (void)
94 return &protvarinmod;
97 const char *protvaritcpt = __FILE__;
98 asm (".protected protvaritcpt");
100 const char **
101 getvaritcpt2 (void)
103 return &protvaritcpt;
106 /* We must never call these functions. */
108 callitcpt3 (void)
110 abort ();
114 (*getitcpt3 (void)) (void)
116 abort ();
119 const char **
120 getvaritcpt3 (void)
122 abort ();