This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: gcj executable size reduction?
- From: David Daney <ddaney at avtrex dot com>
- To: Per Bothner <per at bothner dot com>
- Cc: java at gcc dot gnu dot org
- Date: Thu, 15 Apr 2004 09:19:17 -0700
- Subject: Re: gcj executable size reduction?
- References: <407EABEF.7010208@bothner.com>
Per Bothner wrote:
Another (complementary) approach is reducing the interdependencies
between classes, so a static linker would not link in quite as much
junk. This might be to be a confiuration option, or we could
support various "profiles" like J2ME. Any experience in untangling
dependencies?
Comments? Where should I start?
One thing I have been thinking about (but not acting on), is the
interdependency problem.
For some environments, security is not important, but I think there is
quite a large overhead with security related classes. Off the top of my
head I would do something like this:
Create a new java.lang.SecurityManager implementation where all checks
just return. This should prevent all the *Permission classes and
related cruft from being linked in.
I think you could break libgcj into several parts. For the security
related parts there would be two versions (the full implementation and
the null implementation) that would be selected at either compile time
or perhaps compiler build time.
David Daney.