diff options
author | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-13 01:02:39 +0000 |
---|---|---|
committer | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-13 01:02:39 +0000 |
commit | ab14d426a22e68d6081c0b524918c3d1b3d96f63 (patch) | |
tree | 90f2c51143a8ba2fb5311f20878ab77cfef3f642 /libjava | |
parent | 6e60c5852a2330b24482f8624eb2a9cd22dfed39 (diff) | |
download | gcc-ab14d426a22e68d6081c0b524918c3d1b3d96f63.tar.gz |
2005-05-12 Bryce McKinlay <mckinlay@redhat.com>
* include/jvm.h (gcj::verifyClasses): Declare.
* link.cc (gcj::verbose_class_flag): Moved.
* prims.cc (gcj::verifyClasses): Define here.
(gcj::verbose_class_flag): Move definition here.
(_Jv_Linker::wait_for_state): Don't call verify_class
if gcj::verifyClasses is not set.
* gij.cc (main): Set gcj::verifyClasses when '-noverify' is given.
2005-05-12 Aaron Luchko <aluchko@redhat.com>
* gij.cc (main): Recognize '-verify', '-noverify', and
'-verifyremote'
2005-05-12 Aaron Luchko <aluchko@redhat.com>
* gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99646 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 15 | ||||
-rw-r--r-- | libjava/gij.cc | 8 | ||||
-rw-r--r-- | libjava/include/jvm.h | 3 | ||||
-rw-r--r-- | libjava/link.cc | 6 | ||||
-rw-r--r-- | libjava/prims.cc | 6 |
5 files changed, 34 insertions, 4 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index e0508a5c337..469bb76bc2a 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,18 @@ +2005-05-12 Bryce McKinlay <mckinlay@redhat.com> + + * include/jvm.h (gcj::verifyClasses): Declare. + * link.cc (gcj::verbose_class_flag): Moved. + * prims.cc (gcj::verifyClasses): Define here. + (gcj::verbose_class_flag): Move definition here. + (_Jv_Linker::wait_for_state): Don't call verify_class + if gcj::verifyClasses is not set. + * gij.cc (main): Set gcj::verifyClasses when '-noverify' is given. + +2005-05-12 Aaron Luchko <aluchko@redhat.com> + + * gij.cc (main): Recognize '-verify', '-noverify', and + '-verifyremote' + 2005-05-12 Kaz Kojima <kkojima@gcc.gnu.org> * configure.host: Set IEEESPEC to -mieee for sh*-*-*. diff --git a/libjava/gij.cc b/libjava/gij.cc index 010e72fb5fc..60d5b34817d 100644 --- a/libjava/gij.cc +++ b/libjava/gij.cc @@ -296,6 +296,14 @@ main (int argc, char const** argv) nonstandard_opts_help (); else if (! strncmp (arg, "-X", 2)) add_option (vm_args, arg, NULL); + // Obsolete options recognized for backwards-compatibility. + else if (! strcmp (arg, "-verify") + || ! strcmp (arg, "-verifyremote")) + continue; + else if (! strcmp (arg, "-noverify")) + { + gcj::verifyClasses = false; + } else { fprintf (stderr, "gij: unrecognized option -- `%s'\n", argv[i]); diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h index 6b978f906e4..bceb291fb58 100644 --- a/libjava/include/jvm.h +++ b/libjava/include/jvm.h @@ -230,6 +230,9 @@ namespace gcj /* Print out class names as they are initialized. */ extern bool verbose_class_flag; + + /* When true, enable the bytecode verifier and BC-ABI verification. */ + extern bool verifyClasses; } // This class handles all aspects of class preparation and linking. diff --git a/libjava/link.cc b/libjava/link.cc index 0a705736628..3fe073463f9 100644 --- a/libjava/link.cc +++ b/libjava/link.cc @@ -44,9 +44,6 @@ details. */ using namespace gcj; -// When true, print debugging information about class loading. -bool gcj::verbose_class_flag; - typedef unsigned int uaddr __attribute__ ((mode (pointer))); template<typename T> @@ -1728,7 +1725,8 @@ _Jv_Linker::wait_for_state (jclass klass, int state) if (state >= JV_STATE_LINKED && klass->state < JV_STATE_LINKED) { - verify_class (klass); + if (gcj::verifyClasses) + verify_class (klass); ensure_class_linked (klass); link_exception_table (klass); diff --git a/libjava/prims.cc b/libjava/prims.cc index 98d30232451..af177241acf 100644 --- a/libjava/prims.cc +++ b/libjava/prims.cc @@ -953,6 +953,12 @@ namespace gcj _Jv_Utf8Const *finit_name; bool runtimeInitialized = false; + + // When true, print debugging information about class loading. + bool verbose_class_flag; + + // When true, enable the bytecode verifier and BC-ABI type verification. + bool verifyClasses = true; } // We accept all non-standard options accepted by Sun's java command, |