[PATCH] HPPA/IA64 : Don't use broken DL_AUTO_FUNCTION_ADDRESS()
Guy Martin
gmsoft@tuxicoman.be
Thu Oct 31 12:21:00 GMT 2013
Hi Carlos,
> Andreas makes a good comment that they should really be rewritten
> to avoid needing to create the function pointer, instead the code
> should create and call it as required (that way the created fptr
> need never leave scope). However doing so might be more work than
> you have time for.
>
I've reworked the patch to have the macro call the function directly.
This way it is reentrant.
It has been tested on hppa and amd64. I don't have access to an ia64
box.
Please note that the use of volatile for fptr is mandatory. Without
it, gcc doesn't even bother setting it's value since it's never
accessed via fptr within the scope. Using __attribute__(may_alias)
has been suggested to me but I'm not sure it's the right approach
since it's supported only from gcc 3.4. I haven't tested that either.
Regards,
Guy
More information about the Libc-alpha
mailing list