[PATCH 1/3] Make several more BFD globals thread-local

Tom Tromey tom@tromey.com
Mon Feb 12 23:52:26 GMT 2024


>>>>> "Nick" == Nick Clifton <nickc@redhat.com> writes:

Nick> I am particularly worried about making the error handler thread local
Nick> when this might not match the expectations of a client using the BFD
Nick> library.  Since the error handler is currently global, a client can
Nick> expect to set it once and have it affect all threads.

I suppose so, but it's perhaps worth pointing out that thread-safety is
new, and AFAIK only gdb uses it.  So at least IMO there's a bit of
leeway to define how this should work in the future, rather than feeling
bound by what happens to happen today.

[...]
Nick> This sounds like a lot of work however, and probably something that
Nick> ought to be done as part of a larger project to turn the BFD library
Nick> into a thread-safe and multi-threaded library.

Nick> What are you thoughts ?

I will refresh my knowledge and get back to you soon.

Meanwhile I'm going to push the two patches you approved, since they are
actually somewhat independent of this particular issue.

thanks
Tom


More information about the Binutils mailing list