(tests): Add noload. Add rules to generate noload.
[glibc.git] / elf / vismod2.c
blob35ce4d2564f8e59f991f82552ff9ed010e8646da
1 /* Copyright (C) 2000 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 Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 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 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If not,
16 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
19 #include <stdlib.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 ();