It seems that pgcc (PGI Community Edition Version 18.10 for Windows) doesn’t understand the attribute((section(“name”))) variable attribute. Can someone suggest a workaround? Help would be highly appreciated!
Hi luky0711,
Sorry, but I couldn’t find a good work around sans hacking the generated assembly file or possibility using the “SECTION” option to MS link.
This is the first time we’ve had anyone ask about this feature. I can put in a RFE, but could you please help me understand the benefits of using the section attribute? As far as I can tell it’s mostly used to map data to special hardware which is usually outside of PGI’s HPC focus.
-Mat
Hi Mat,
thank you for your answer. We are trying to hook a destructor function into Microsoft’s CRT. Something like
PIMAGE_TLS_CALLBACK thrd__tls_callback
attribute((section(“.CRT$XLB”))) = thrd__on_thread_exit;
#pragma fini or attribute((destructor)) don’t work under Windows.