This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcj/12908] gnu.gcj.convert.Input_UTF8 not found when compiling from bytecode.
- From: "tromey at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Nov 2003 19:38:09 -0000
- Subject: [Bug libgcj/12908] gnu.gcj.convert.Input_UTF8 not found when compiling from bytecode.
- References: <20031105094302.12908.oyvind.harboe@zylin.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From tromey at gcc dot gnu dot org 2003-11-08 19:38 -------
The "foo.class" syntax can't be represented
directly in a .class file. (The basic problem
is that ldc can't load a class constant; I hear
this restriction might be lifted.)
Instead "foo.class" is compiled as a call to
Class.forName("foo"), which of course breaks
the linking approach. When compiling from .java,
we just emit a symbolic reference to the class.
The workaround is to always compile this sort
of hacky class from .java. Another workaround
is to force a symbol provided by the class to
be undefined; you can do this by passing arguments
to the linker.
There is no way to enumerate the classes you need.
This is one fundamental problem with static linking.
These classes are internal implementation details.
We don't want to link them all in, since that would
cause a lot of bloat (and one reason for static
linking is smaller systems).
There are lots of ideas on how to solve this. None
are implemented.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12908