Can GDC make DLLs?

Ben Davis entheh at cantab.net
Sat Feb 23 10:18:06 PST 2013


Hi,

Has anyone had any success using GDC to make DLLs to be called from C/C++?

The reason I ask is, for me, the following snippet inside dll.d / 
dll_fixTLS() seems to have compiled to a call to abort():

         void** peb;
         asm
         {
             mov EAX,FS:[0x30];
             mov peb, EAX;
         }

and thus dll_process_attach() crashes the process.

It seems like a bug that would affect more people than just me, yet I 
couldn't find any evidence of other people hitting it. Have I got it 
right what's happening, or is something else at work?

If I'm right, then I'm just wondering if anyone has any ideas on whether 
it could be fixed, and how?

Also, I found some discussion about D-style inline asm being problematic 
and worthy of removal, but didn't find any explanation as to what those 
problems were. I'm curious :)

Thanks in advance if anyone can help. This is my first post in this 
group, so I hope it meets the necessary standards :)

Ben :)


More information about the D.gnu mailing list