On Mon, 20 Apr 2026 16:09:09 GMT, Quan Anh Mai <[email protected]> wrote:

> As a result, is there an annotation that tells the compiler that a virtual 
> method should not be removed?

There are some attributes like attribute 'retain' , e.g. here is some discussion
https://stackoverflow.com/questions/73887908/prevent-gcc-from-optimization-removal-of-variables-when-using-wl-gc-sections

But from what I saw it did not really help with linker-step based elimination.
And how would I use it with the vtable, I have to write the attribute next to 
some variables/methods etc. ?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/30771#issuecomment-4289243483

Reply via email to