[Bug target/80881] Implement Windows native TLS
lh_mouse at 126 dot com
gcc-bugzilla@gcc.gnu.org
Thu Dec 4 11:25:19 GMT 2025
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`.
More information about the Gcc-bugs
mailing list