On 08/18/2016 07:14 AM, Peter Maydell wrote:
On 18 August 2016 at 15:04, Richard Henderson <r...@twiddle.net> wrote:
or (2) ifunc

While we're on the subject, can somebody explain to me why we
use ifuncs at all? I couldn't work out why it would be better than
just using a straightforward function pointer -- when I tried single
stepping through things the ifunc approach still seemed to indirect
through some table or other so it wasn't actually resolving to
a direct function call anyway.

No reason, I suppose.

It's particularly helpful for libraries, where we don't really want the overhead of the initialization when it's not used.

But (1) we don't have many of these and (2) we really don't care *that* much about startup time.

So a simple function pointer initialized by a constructor has the same effect.


r~

Reply via email to