This is the mail archive of the java@gcc.gnu.org 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]
Other format: [Raw text]

Re: question about vtable-gc


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.



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