aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6/libjava/libgcj_bc.c
diff options
context:
space:
mode:
authorJing Yu <jingyu@google.com>2011-12-19 16:56:54 -0800
committerJing Yu <jingyu@google.com>2011-12-19 16:56:54 -0800
commit40d7cd0fd78fe2004e2a53c4618c148339b02733 (patch)
tree5874557a6c86a1f564a03e5f28b266e31bc3759c /gcc-4.6/libjava/libgcj_bc.c
parentfe2afdf3f3701489c05d2a7509752d6f0c7616f7 (diff)
downloadtoolchain_gcc-40d7cd0fd78fe2004e2a53c4618c148339b02733.tar.gz
toolchain_gcc-40d7cd0fd78fe2004e2a53c4618c148339b02733.tar.bz2
toolchain_gcc-40d7cd0fd78fe2004e2a53c4618c148339b02733.zip
Add gcc-4.6. Synced to @180989
Change-Id: Ie3676586e1d8e3c8cd9f07d022f450d05fa08439 svn://gcc.gnu.org/svn/gcc/branches/google/gcc-4_6-mobile
Diffstat (limited to 'gcc-4.6/libjava/libgcj_bc.c')
-rw-r--r--gcc-4.6/libjava/libgcj_bc.c125
1 files changed, 125 insertions, 0 deletions
diff --git a/gcc-4.6/libjava/libgcj_bc.c b/gcc-4.6/libjava/libgcj_bc.c
new file mode 100644
index 000000000..67f00aebf
--- /dev/null
+++ b/gcc-4.6/libjava/libgcj_bc.c
@@ -0,0 +1,125 @@
+/* libgcj_bc.c */
+
+/* Copyright (C) 2006, 2009 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+/* This file is used to build libgcj_bc.so, a 'fake' library that is
+ used at link time only. It ensures that binaries built with the
+ BC-ABI link against a constant SONAME. This way, BC-ABI binaries
+ continue to work if the SONAME underlying libgcj.so changes. */
+
+#include <stdlib.h>
+#include <stdio.h>
+
+static void print_wrong_lib_msg ()
+{
+ fprintf (stderr, "libgcj error: \
+This is libgcj_bc.so, a fake library used only for linking.\n\
+Please create a symlink from libgcj_bc.so.1 to the real libgcj.so.\n");
+ exit (1);
+}
+
+/* Functions called from code generated by gcj. */
+
+void _Jv_AllocObject () {}
+void _Jv_AllocObjectNoFinalizer () {}
+void _Jv_CheckArrayStore () {}
+void _Jv_CheckCast () {}
+void _Jv_InitClass () {}
+void _Jv_IsInstanceOf () {}
+void _Jv_LookupInterfaceMethod () {}
+void _Jv_LookupInterfaceMethodIdx () {}
+void _Jv_MonitorEnter () {}
+void _Jv_MonitorExit () {}
+void _Jv_NewMultiArray () {}
+void _Jv_NewObjectArray () {}
+void _Jv_NewPrimArray () {}
+void _Jv_RegisterResource () {}
+void _Jv_ResolvePoolEntry () {}
+void _Jv_Throw () {}
+void _Jv_ThrowAbstractMethodError () {}
+void _Jv_ThrowBadArrayIndex () {}
+void _Jv_ThrowNoSuchFieldError () {}
+void _Jv_ThrowNullPointerException () {}
+void __gcj_personality_v0 () {}
+
+void _Jv_RegisterClasses ()
+{
+ print_wrong_lib_msg ();
+}
+
+void _Jv_RegisterNewClasses ()
+{
+ print_wrong_lib_msg ();
+}
+
+/* Symbols used by jvgenmain (-fmain). */
+
+void JvRunMain () {}
+void JvRunMainName () {}
+const char **_Jv_Compiler_Properties;
+
+/* Functions used by -fjni. */
+
+void _Jv_GetJNIEnvNewFrame () {}
+void _Jv_LookupJNIMethod () {}
+void _Jv_UnwrapJNIweakReference () {}
+void _Jv_JNI_PopSystemFrame () {}
+
+
+/* Checked divide (-fuse-divide-subroutine). */
+
+void _Jv_divI () {}
+void _Jv_divJ () {}
+void _Jv_remI () {}
+void _Jv_remJ () {}
+
+
+/* CNI Functions. */
+
+void _Jv_AllocBytes () {}
+void _Jv_AllocString () {}
+void _Jv_AttachCurrentThread () {}
+void _Jv_AttachCurrentThreadAsDaemon () {}
+void _Jv_CreateJavaVM () {}
+void _Jv_DetachCurrentThread () {}
+void _Jv_Free () {}
+void _Jv_GetStringUTFLength () {}
+void _Jv_GetStringUTFRegion () {}
+void _Jv_Malloc () {}
+void _Jv_NewString () {}
+void _Jv_NewStringLatin1 () {}
+void _Jv_NewStringUTF () {}
+void _Jv_Realloc () {}
+
+
+/* Classes for primitive types. */
+
+#define DECLARE_PRIM_TYPE(NAME) \
+ int _Jv_##NAME##Class;
+
+DECLARE_PRIM_TYPE(byte)
+DECLARE_PRIM_TYPE(short)
+DECLARE_PRIM_TYPE(int)
+DECLARE_PRIM_TYPE(long)
+DECLARE_PRIM_TYPE(boolean)
+DECLARE_PRIM_TYPE(char)
+DECLARE_PRIM_TYPE(float)
+DECLARE_PRIM_TYPE(double)
+DECLARE_PRIM_TYPE(void)
+
+
+/* Force executable to export __data_start et al. */
+
+#pragma weak __data_start
+extern int __data_start[];
+#pragma weak data_start
+extern int data_start[];
+#pragma weak _end
+extern int _end[];
+static void *dummy[] __attribute__((used)) = {__data_start, data_start, _end};