support: Simplify compiling most of support/ outside of glibc
[glibc.git] / elf / vismod1.c
blob3e56404ce73451bbb5ab2a63268fc0aef290325f
1 /* Copyright (C) 2000-2017 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 "vismod.h"
20 int
21 protlocal (void)
23 return 0x4;
25 asm (".protected protlocal");
28 int
29 calllocal1 (void)
31 return protlocal () + 0x10;
34 int
35 (*getlocal1 (void)) (void)
37 return protlocal;
40 int
41 protinmod (void)
43 return 0x400;
45 asm (".protected protinmod");
47 int
48 callinmod1 (void)
50 return protinmod () + 0x1000;
53 int
54 (*getinmod1 (void)) (void)
56 return protinmod;
59 int
60 protitcpt (void)
62 return 0x40000;
64 asm (".protected protitcpt");
66 int
67 callitcpt1 (void)
69 return protitcpt () + 0x100000;
72 int
73 (*getitcpt1 (void)) (void)
75 return protitcpt;
78 const char *protvarlocal = __FILE__;
79 asm (".protected protvarlocal");
81 const char **
82 getvarlocal1 (void)
84 return &protvarlocal;
87 const char *protvarinmod = __FILE__;
88 asm (".protected protvarinmod");
90 const char **
91 getvarinmod1 (void)
93 return &protvarinmod;
96 const char *protvaritcpt = __FILE__;
97 asm (".protected protvaritcpt");
99 const char **
100 getvaritcpt1 (void)
102 return &protvaritcpt;