https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113874
--- Comment #32 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Michael Matz from comment #31) > (In reply to H.J. Lu from comment #30) > > (In reply to Michael Matz from comment #29) > > > It not only can call malloc. As the backtrace of H.J. shows, it quite > > > clearly _does_ so :-) > > > > ld.so can only call the malloc implementation internal to ld.so. > > (And string functions for initializing that memory) If that's ensured > already > everywhere: super. Because I agree, that this is the best thing to do here. > From my perspective this is pure internal implementation details and hence > setting up thread-local areas should not be expected to be interposable by > users. > (a custom allocator that isn't malloc or doesn't interact with it also would > work) Since ia32 ld.so in glibc is compiled with: Makefile:rtld-CFLAGS += -mno-sse -mno-mmx -mfpmath=387 ia32 _dl_tlsdesc_dynamic is OK.