https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80881

--- Comment #108 from LIU Hao <lh_mouse at 126 dot com> ---
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.

`.CRT` and `.tls` sections must not be subject to `-fdata-sections`.

Reply via email to