This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] HPPA/IA64 : Don't use broken DL_AUTO_FUNCTION_ADDRESS()



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]