PR c++/60367
[official-gcc.git] / libjava / libgcj_bc.c
blob67f00aebfb08628df152eae6be58f73f5ceb282d
1 /* libgcj_bc.c */
3 /* Copyright (C) 2006, 2009 Free Software Foundation
5 This file is part of libgcj.
7 This software is copyrighted work licensed under the terms of the
8 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
9 details. */
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. */
16 #include <stdlib.h>
17 #include <stdio.h>
19 static void print_wrong_lib_msg ()
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);
27 /* Functions called from code generated by gcj. */
29 void _Jv_AllocObject () {}
30 void _Jv_AllocObjectNoFinalizer () {}
31 void _Jv_CheckArrayStore () {}
32 void _Jv_CheckCast () {}
33 void _Jv_InitClass () {}
34 void _Jv_IsInstanceOf () {}
35 void _Jv_LookupInterfaceMethod () {}
36 void _Jv_LookupInterfaceMethodIdx () {}
37 void _Jv_MonitorEnter () {}
38 void _Jv_MonitorExit () {}
39 void _Jv_NewMultiArray () {}
40 void _Jv_NewObjectArray () {}
41 void _Jv_NewPrimArray () {}
42 void _Jv_RegisterResource () {}
43 void _Jv_ResolvePoolEntry () {}
44 void _Jv_Throw () {}
45 void _Jv_ThrowAbstractMethodError () {}
46 void _Jv_ThrowBadArrayIndex () {}
47 void _Jv_ThrowNoSuchFieldError () {}
48 void _Jv_ThrowNullPointerException () {}
49 void __gcj_personality_v0 () {}
51 void _Jv_RegisterClasses ()
53 print_wrong_lib_msg ();
56 void _Jv_RegisterNewClasses ()
58 print_wrong_lib_msg ();
61 /* Symbols used by jvgenmain (-fmain). */
63 void JvRunMain () {}
64 void JvRunMainName () {}
65 const char **_Jv_Compiler_Properties;
67 /* Functions used by -fjni. */
69 void _Jv_GetJNIEnvNewFrame () {}
70 void _Jv_LookupJNIMethod () {}
71 void _Jv_UnwrapJNIweakReference () {}
72 void _Jv_JNI_PopSystemFrame () {}
75 /* Checked divide (-fuse-divide-subroutine). */
77 void _Jv_divI () {}
78 void _Jv_divJ () {}
79 void _Jv_remI () {}
80 void _Jv_remJ () {}
83 /* CNI Functions. */
85 void _Jv_AllocBytes () {}
86 void _Jv_AllocString () {}
87 void _Jv_AttachCurrentThread () {}
88 void _Jv_AttachCurrentThreadAsDaemon () {}
89 void _Jv_CreateJavaVM () {}
90 void _Jv_DetachCurrentThread () {}
91 void _Jv_Free () {}
92 void _Jv_GetStringUTFLength () {}
93 void _Jv_GetStringUTFRegion () {}
94 void _Jv_Malloc () {}
95 void _Jv_NewString () {}
96 void _Jv_NewStringLatin1 () {}
97 void _Jv_NewStringUTF () {}
98 void _Jv_Realloc () {}
101 /* Classes for primitive types. */
103 #define DECLARE_PRIM_TYPE(NAME) \
104 int _Jv_##NAME##Class;
106 DECLARE_PRIM_TYPE(byte)
107 DECLARE_PRIM_TYPE(short)
108 DECLARE_PRIM_TYPE(int)
109 DECLARE_PRIM_TYPE(long)
110 DECLARE_PRIM_TYPE(boolean)
111 DECLARE_PRIM_TYPE(char)
112 DECLARE_PRIM_TYPE(float)
113 DECLARE_PRIM_TYPE(double)
114 DECLARE_PRIM_TYPE(void)
117 /* Force executable to export __data_start et al. */
119 #pragma weak __data_start
120 extern int __data_start[];
121 #pragma weak data_start
122 extern int data_start[];
123 #pragma weak _end
124 extern int _end[];
125 static void *dummy[] __attribute__((used)) = {__data_start, data_start, _end};