在 2022-12-24 01:43, Pali Rohár 写道:
Ou right. They would also require __attribute__((used)) for LTO builds. I just tested simple single process/thread console applications and they worked.Do you have any test case application which would be affected if these symbols are eliminated?
Does this program still have an output, with LTO?
```
typedef void atexit_func(void*);
extern int __cxa_thread_atexit(atexit_func*, void*, void*);
extern void* __dso_handle;
extern int puts(const char*);
int
main(void)
{
/* print a string upon the current thread's exit. */
__cxa_thread_atexit((atexit_func*) puts, "test thread atexit",
&__dso_handle);
}
```
This attempts to call the `__cxa_thread_atexit` from mingw-w64 CRT instead of the one provided by
libgcc. If TLS facilities are optimized out then there will be no output.
-- Best regards, LIU Hao
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
