https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80881
--- Comment #109 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- > When compiling with `-fdata-sections`, TLS template data can be placed into > sections like > > 12 .tls$_ZSt11__once_call 00000008 0000000000000000 DATA > > which causes them to be sorted after `.tls$ZZZ`. The module which contains > such data will be granted a TLS memory block of a wrong size, and is likely > to result in heap corruption. Yes, we ran into the problem yesterday, which results in the miscompilation of the libstdc++. The patch to be attached is sufficient to fix it.
