|
From: | Michael Aganier |
Subject: | [Tinycc-devel] Linux constructor/destructor support |
Date: | Sun, 30 Apr 2023 02:19:39 +0000 |
Dear TinyCC team, I inquire to you for the possible addition of constructor/destructor attribute for Linux. While searching for why the constructor attribute seemed not to work on Linux, I found these two commits: Add constructor/destructor
support Add
windows constructor/destructor support To confirm my suspicion that constructor/destructor was only implemented for Windows, I tried to compile the following code with the Windows MinGW version of TCC: ```C #include
<stdio.h> __attribute__((constructor))
void my_constructor()
{ printf("This is my constructor function\n"); } int main() {
return
0; } ``` ```C cd tinycc ./configure make ./tcc.exe main.c -Iwin32/include -L. ./test.exe This is my constructor function ``` The same code executed on a Linux machine seems to ignore the constructor attribute. Would you consider adding support for constructor/destructor on Linux? Thank you, Michael |
[Prev in Thread] | Current Thread | [Next in Thread] |