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]

Another way to salvage Annex K and its constraint handler


While looking at __dso_handle and implementing a no-fail wrapper for
getrandom, it occurred to me that we can implement Annex K in a useful
fashion, with the constraint handler:

We put the variable that holds the constraint handler address into
libc_nonshared.a (maybe even as a weak symbol), and pass the address of
the variable to the actual Annex K implementation functions (with the
help of inline wrappers, probably).  This way, each DSO can install the
constraint handler it wants.  This would remove the need for a
per-thread constraint handler (which would require constant switching of
the handler at library boundaries) because libraries know when they
change constraint handlers and implement suitable locking.

DSOs are out of the scope of C standard, so no standards action is
needed here.

Thoughts?

Florian


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