Question re: Thunks (was Re: [PATCH] - Fix PR 21956 and PR 22003)

Ian Lance Taylor ian@airs.com
Mon Aug 1 20:55:00 GMT 2005


Caroline Tice <ctice@apple.com> writes:

> Before I can begin to fix this I need to understand better which of
> the following options is the correct one.  (Also, I'd like some sense
> of how important it is to fix this quickly, as I have other things I'm
> supposed to be working on):

I think the interesting issue is that thunks normally end with a jump
instruction to the function with which they are associated, and the
target of the jump has to be in range.  Other than that I expect that
thunks should be coalesced/comdat in the same way as the function with
which they are associated.

A thunk is just another function which appears in the virtual table,
but it happens to be implemented specially in that it ends by jumping
to one of the other virtual table functions.

Ian



More information about the Gcc-patches mailing list