]>
Commit | Line | Data |
---|---|---|
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 |
21 | int |
22 | protlocal (void) | |
23 | { | |
24 | return 0x40; | |
25 | } | |
26 | asm (".protected protlocal"); | |
27 | ||
28 | ||
29 | int | |
30 | calllocal2 (void) | |
31 | { | |
32 | return protlocal () + 0x100; | |
33 | } | |
34 | ||
35 | int | |
36 | (*getlocal2 (void)) (void) | |
37 | { | |
38 | return protlocal; | |
39 | } | |
40 | ||
41 | int | |
42 | protinmod (void) | |
43 | { | |
44 | return 0x4000; | |
45 | } | |
46 | asm (".protected protinmod"); | |
47 | ||
48 | int | |
49 | callinmod2 (void) | |
50 | { | |
51 | return protinmod () + 0x10000; | |
52 | } | |
53 | ||
54 | int | |
55 | (*getinmod2 (void)) (void) | |
56 | { | |
57 | return protinmod; | |
58 | } | |
59 | ||
60 | int | |
61 | protitcpt (void) | |
62 | { | |
63 | return 0x400000; | |
64 | } | |
65 | asm (".protected protitcpt"); | |
66 | ||
67 | int | |
68 | callitcpt2 (void) | |
69 | { | |
70 | return protitcpt () + 0x1000000; | |
71 | } | |
72 | ||
73 | int | |
74 | (*getitcpt2 (void)) (void) | |
75 | { | |
76 | return protitcpt; | |
77 | } | |
78 | ||
79 | const char *protvarlocal = __FILE__; | |
80 | asm (".protected protvarlocal"); | |
81 | ||
8a3e01b9 | 82 | const char ** |
eec8ef5a UD |
83 | getvarlocal2 (void) |
84 | { | |
8a3e01b9 | 85 | return &protvarlocal; |
eec8ef5a UD |
86 | } |
87 | ||
88 | const char *protvarinmod = __FILE__; | |
89 | asm (".protected protvarinmod"); | |
90 | ||
8a3e01b9 | 91 | const char ** |
eec8ef5a UD |
92 | getvarinmod2 (void) |
93 | { | |
8a3e01b9 | 94 | return &protvarinmod; |
eec8ef5a UD |
95 | } |
96 | ||
97 | const char *protvaritcpt = __FILE__; | |
98 | asm (".protected protvaritcpt"); | |
99 | ||
8a3e01b9 | 100 | const char ** |
eec8ef5a UD |
101 | getvaritcpt2 (void) |
102 | { | |
8a3e01b9 | 103 | return &protvaritcpt; |
eec8ef5a UD |
104 | } |
105 | ||
106 | /* We must never call these functions. */ | |
107 | int | |
108 | callitcpt3 (void) | |
109 | { | |
110 | abort (); | |
111 | } | |
112 | ||
113 | int | |
114 | (*getitcpt3 (void)) (void) | |
115 | { | |
116 | abort (); | |
117 | } | |
118 | ||
8a3e01b9 | 119 | const char ** |
eec8ef5a UD |
120 | getvaritcpt3 (void) |
121 | { | |
122 | abort (); | |
123 | } |