Back to index

glibc  2.9
vismod2.c
Go to the documentation of this file.
00001 /* Copyright (C) 2000 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 #include <stdlib.h>
00020 #include "vismod.h"
00021 
00022 int
00023 protlocal (void)
00024 {
00025   return 0x40;
00026 }
00027 asm (".protected protlocal");
00028 
00029 
00030 int
00031 calllocal2 (void)
00032 {
00033   return protlocal () + 0x100;
00034 }
00035 
00036 int
00037 (*getlocal2 (void)) (void)
00038 {
00039   return protlocal;
00040 }
00041 
00042 int
00043 protinmod (void)
00044 {
00045   return 0x4000;
00046 }
00047 asm (".protected protinmod");
00048 
00049 int
00050 callinmod2 (void)
00051 {
00052   return protinmod () + 0x10000;
00053 }
00054 
00055 int
00056 (*getinmod2 (void)) (void)
00057 {
00058   return protinmod;
00059 }
00060 
00061 int
00062 protitcpt (void)
00063 {
00064   return 0x400000;
00065 }
00066 asm (".protected protitcpt");
00067 
00068 int
00069 callitcpt2 (void)
00070 {
00071   return protitcpt () + 0x1000000;
00072 }
00073 
00074 int
00075 (*getitcpt2 (void)) (void)
00076 {
00077   return protitcpt;
00078 }
00079 
00080 const char *protvarlocal = __FILE__;
00081 asm (".protected protvarlocal");
00082 
00083 const char **
00084 getvarlocal2 (void)
00085 {
00086   return &protvarlocal;
00087 }
00088 
00089 const char *protvarinmod = __FILE__;
00090 asm (".protected protvarinmod");
00091 
00092 const char **
00093 getvarinmod2 (void)
00094 {
00095   return &protvarinmod;
00096 }
00097 
00098 const char *protvaritcpt = __FILE__;
00099 asm (".protected protvaritcpt");
00100 
00101 const char **
00102 getvaritcpt2 (void)
00103 {
00104   return &protvaritcpt;
00105 }
00106 
00107 /* We must never call these functions.  */
00108 int
00109 callitcpt3 (void)
00110 {
00111   abort ();
00112 }
00113 
00114 int
00115 (*getitcpt3 (void)) (void)
00116 {
00117   abort ();
00118 }
00119 
00120 const char **
00121 getvaritcpt3 (void)
00122 {
00123   abort ();
00124 }