This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


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

Re: gcj -D


>>>>> "Mike" == Mike Moreton <mike@pillim.demon.co.uk> writes:

>> Another way to solve your problem is to have the linker omit code
>> that is not used.  When you build the production version of your
>> application, you would link with a special flag to do this.  The
>> GNU binutils have support for this, but gcj doesn't take advantage
>> of it yet.

Mike> This is something I'd like to know more about.  Can you give me
Mike> any pointers to where to look?

g++ implements the compiler side of this, I think.  GNU ld implements
the linker side.  It is called "section GC".  The idea is that you put
each function into its own section and then you simply don't link in
unused sections.

It might be complicated to implement this for gcj.  For instance you
have to deal with Class.forName in a reasonable way.  This is
important because some classes in libjava use forName.

Tom




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