This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
when will __attribute__((constructor)) NOT called
- From: Yubin Ruan <ablacktshirt at gmail dot com>
- To: libc-help at sourceware dot org
- Date: Wed, 6 Sep 2017 18:37:34 +0800
- Subject: when will __attribute__((constructor)) NOT called
- Authentication-results: sourceware.org; auth=none
I saw somewhere that "__attribute__((constructor)) will make GCC
create a '.ctor' section in the generated .so file, which is run when
a shared library is loaded, typically at program startup".
A question:
Are there any case where "__attribute__((constructor))" will not be run?
Thanks,
Yubin