This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: question about vtable-gc
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- To: Adam Megacz <gcj at lists dot megacz dot com>
- Cc: java at gcc dot gnu dot org
- Date: Tue, 18 Dec 2001 15:36:47 +1300
- Subject: Re: question about vtable-gc
- References: <86n10hgtry.fsf@megacz.com>
Adam Megacz wrote:
>Is this a correct assessment of why vtable-gc isn't as simple as the
>linker dropping unreferenced symbols? The only thing that confuses me
>is that I see symbols for method names in A.java showing up in B.o (B
>invokes A's methods) -- but this shouldn't be the case, should it?
>
If the methods are static then the symbols will show up. If B extends A
then they will show up because the vtable for B references A's methods.
>I'm trying to figure out some sort of hack to get a similar effect to
>vtable-gc.. I don't have time to implement the real thing.
>
You could try experimenting with "--indirect-dispatch", which causes no
vtables to be generated. You'll have to be sure to manually include all
the classes that ever get called virtually.
regards
Bryce.