Implement __attribute__((nodecorate))
commit0edbed1d52aa8a5604002108232dc72c92b873e9
authorJonathan Newman <jonathannewman314@gmail.com>
Sat, 21 Jul 2018 23:54:01 +0000 (22 00:54 +0100)
committerJonathan Newman <jonathannewman314@gmail.com>
Sat, 21 Jul 2018 23:54:01 +0000 (22 00:54 +0100)
tree9c1edfa8f3450511f916aac23be9c2c6c18cb6f3
parentd79caa9ff6d42e11a8f21e9c22aefbfa4c25d7ed
Implement __attribute__((nodecorate))

Prevent any decoration that would otherwise affect an exported
PE function. For example, given the following:

__declspec(dllexport) __stdcall
int decorated(int arg) {
    return 0;
}

__declspec(dllexport) __stdcall __attribute__((nodecorate))
int undecorated(int arg) {
    return 0;
}

The following exported functions can now be seen in the DLL:
_decorated@4
undecorated

The attribute is recognised for all targets but only
affects PE codegen. I'm not sure whether this would be
useful for other targets; its intended use was to allow
the creation of a DLL matching an existing set of signatures.
tcc-doc.texi
tcc.h
tccgen.c
tcctok.h