Reducing static binary sizes

Andrea aime andrea.aime@aliceposta.it
Sun Jan 8 12:24:00 GMT 2006


Adam Megacz wrote:
> Andrea Aime <andrea.aime@aliceposta.it> writes:
>>>Hi Adam, I'm looking for a way to reduce the size of a statically
>>linked executable generated by gcj and people on the gcj lists say
>>you are the one to contact. See the thread at:
>>http://comments.gmane.org/gmane.comp.gcc.java.devel/13001.
>>> Ah yes, that was this thing called NanoGoat. It did require a bit of
> fidgeting; due to native methods inside libgcj you'd always have to
> "forcibly include" a few classes that it couldn't figure out were
> reachable.
>> Ultimately I figured out that it was better to replace unreachable
> methods with a tiny stub (just throw an error) than actually remove
> the methods and bludgeon the linker into doing my bidding.
>> The guy you *really* want to talk to is Brian "Bytecode" Alliet
> (cc'd), who really took the concept to the next level with gcclass:
>> http://darcs.brianweb.net/gcclass/
>
Cool, thank you Adam, I'll try it and report back where I got with
executable size reduction. In the meantime, can someone more 
knowledgeable tell the poor java programmer if it's possible to link
a different version of the runtime library (a stripped one, for example)
instead of the standard libgjc? I've tried to read the gcj online 
manual, but didn't have much luck...
Best regards
Andrea Aime


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /