[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shared text, shared libs again



On Thu, Jun 18, 1998 at 03:06:00AM -0700, Howard Chu wrote:
 
> This global pointer handling works for all cases where you call a function
> directly.
> However, there's a complication if you have a shared library function that
> takes a
> function pointer as one of its arguments, to be used as a callback function.
> If the
> callback function resides in a different module than the library function,
> then the callback's a4 somehow needs to be fixed, or the callback must only
> use local variables.
> My current thought here is to make the "pointer to function" type an 8-byte
> type, so
> that both the function address and its a4 pointer may be passed along. I
> believe this will work transparently enough without breaking a lot of code.

Hm. That would mean that a pointer to function would have a different size
than other pointers - is this allowed by ANSI?

What about void*, which should be able to be cast to any pointer?

I guess this might break some existing code.

cu
Michael
-- 
Michael Schwingen, Ahornstrasse 36, 52074 Aachen