This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libgcj/12908] gnu.gcj.convert.Input_UTF8 not found when compiling from bytecode.


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]