Ok, I just tried the nodecorate attribute (I'm using TCC version 0.9.27),
and it doesn't work. TCC is behaving as if I never typed the nodecorate
attribute at all. It's literally completely ignoring that attribute. Here's
my code:

__attribute((dllexport,stdcall,nodecorate)) int TestFuncStdcall(int
arg1,int arg2){
    return arg1+arg2;
}


Here's what I typed in the command line to compile it:
tcc -shared test.c


Here's the resulting DEF file that shows the names of the function in the
compiled DLL file:
LIBRARY test.dll

EXPORTS
_TestFuncStdcall@8


You can see what the problem is. It still decorates it. Your addition of
the nodecorate attribute clearly has a bug.

Message: 2
> Date: Mon, 13 May 2019 12:29:14 +0100
> From: Jonathan Newman <jonathannewman...@gmail.com>
> To: tinycc-devel@nongnu.org
> Subject: Re: [Tinycc-devel] How do I rename exported DLL function?
> Message-ID:
>         <CAN=
> e4mvt0sgowu_qhmuby+bvxbtjvc2da_wfpmk0tq5eijv...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> I added a "nodecorate" attribute a while ago to handle this (it just
> suppresses the addition of "_" and "@n"). It would be nice to add support
> for reading .def files at some point...
>
>
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to