diff options
Diffstat (limited to 'gcc/java/gcj.texi')
-rw-r--r-- | gcc/java/gcj.texi | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/java/gcj.texi b/gcc/java/gcj.texi index 84659a54..ae7bcb7 100644 --- a/gcc/java/gcj.texi +++ b/gcc/java/gcj.texi @@ -546,6 +546,28 @@ This is convenient, as it means that things like @code{Class.forName()} will search @samp{CLASSPATH} to find the desired class. +@item -freduced-reflection +This option causes the code generated by @command{gcj} to contain a +reduced amount of the class meta-data used to support runtime +reflection. The cost of this savings is the loss of +the ability to use certain reflection capabilities of the standard +Java runtime environment. When set all meta-data except for that +which is needed to obtain correct runtime semantics is eliminated. + +For code that does not use reflection (i.e. the methods in the +@code{java.lang.reflect} package), @code{-freduced-reflection} +will result in proper operation with a savings in executable code size. + +JNI (@code{-fjni}) and the binary compatibility ABI +(@code{-findirect-dispatch}) do not work properly without full +reflection meta-data. Because of this, it is an error to use these options +with @code{-freduced-reflection}. + +@strong{Caution:} If there is no reflection meta-data, code that uses +a @code{SecurityManager} may not work properly. Also calling +@code{Class.forName()} may fail if the calling method has no +reflection meta-data. + @end table |