OSDN Git Service

* c.opt: Fixup for Objective-C/C++.
[pf3gnuchains/gcc-fork.git] / libjava / libgcj_bc.c
1 /* libgcj_bc.c  */
2
3 /* Copyright (C) 2006 Free Software Foundation
4
5    This file is part of libgcj.
6
7 This software is copyrighted work licensed under the terms of the
8 Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
9 details.  */
10
11 /* This file is used to build libgcj_bc.so, a 'fake' library that is
12    used at link time only. It ensures that binaries built with the
13    BC-ABI link against a constant SONAME. This way, BC-ABI binaries
14    continue to work if the SONAME underlying libgcj.so changes.  */
15
16 #include <stdlib.h>
17 #include <stdio.h>
18
19 static void print_wrong_lib_msg ()
20 {
21   fprintf (stderr, "libgcj error: \
22 This is libgcj_bc.so, a fake library used only for linking.\n\
23 Please create a symlink from libgcj_bc.so.1 to the real libgcj.so.\n");
24   exit (1);
25 }
26
27 /* Functions called from code generated by gcj.  */
28
29 void __gcj_personality_v0 () {}
30 void _Jv_AllocObject () {}
31 void _Jv_AllocObjectNoFinalizer () {}
32 void _Jv_InitClass () {}
33 void _Jv_ResolvePoolEntry () {}
34 void _Jv_Throw () {}
35 void _Jv_MonitorEnter () {}
36 void _Jv_NewPrimArray () {}
37 void _Jv_NewObjectArray () {}
38 void _Jv_NewMultiArray () {}
39 void _Jv_ThrowBadArrayIndex () {}
40 void _Jv_ThrowNullPointerException () {}
41 void _Jv_ThrowAbstractMethodError () {}
42 void _Jv_ThrowNoSuchFieldError () {}
43 void _Jv_CheckCast () {}
44 void _Jv_IsInstanceOf () {}
45 void _Jv_CheckArrayStore () {}
46 void _Jv_LookupInterfaceMethodIdx () {}
47
48 void _Jv_RegisterClasses () 
49 {
50   print_wrong_lib_msg ();
51 }
52
53 void _Jv_RegisterNewClasses () 
54 {
55   print_wrong_lib_msg ();
56 }
57
58 /* Symbols used by jvgenmain (-fmain).  */
59
60 void JvRunMain () {}
61 void JvRunMainName () {}
62 const char **_Jv_Compiler_Properties;
63
64 /* Functions used by -fjni.  */
65
66 void _Jv_LookupJNIMethod () {}
67 void _Jv_GetJNIEnvNewFrame () {}
68 void _Jv_UnwrapJNIweakReference () {}
69
70
71 /* Checked divide (-fuse-divide-subroutine).  */
72
73 void _Jv_divI () {}
74 void _Jv_remI () {}
75 void _Jv_divJ () {}
76 void _Jv_remJ () {}
77
78
79 /* CNI Functions.  */
80
81 void _Jv_AllocBytes () {}
82 void _Jv_AllocString () {}
83 void _Jv_NewString () {}
84 void _Jv_NewStringLatin1 () {}
85 void _Jv_GetStringChars () {}
86 void _Jv_GetStringUTFLength () {}
87 void _Jv_GetStringUTFRegion () {}
88 void _Jv_NewStringUTF () {}
89 void _Jv_Malloc () {}
90 void _Jv_Realloc () {}
91 void _Jv_Free () {}
92 void _Jv_CreateJavaVM () {}
93 void _Jv_AttachCurrentThread () {}
94 void _Jv_AttachCurrentThreadAsDaemon () {}
95 void _Jv_DetachCurrentThread () {}
96
97
98 /* Classes for primitive types.  */
99
100 #define DECLARE_PRIM_TYPE(NAME)                 \
101   int _Jv_##NAME##Class;
102
103 DECLARE_PRIM_TYPE(byte)
104 DECLARE_PRIM_TYPE(short)
105 DECLARE_PRIM_TYPE(int)
106 DECLARE_PRIM_TYPE(long)
107 DECLARE_PRIM_TYPE(boolean)
108 DECLARE_PRIM_TYPE(char)
109 DECLARE_PRIM_TYPE(float)
110 DECLARE_PRIM_TYPE(double)
111 DECLARE_PRIM_TYPE(void)