Plugins and D programs

Steve Teale steve.teale at britseyeview.com
Sun Mar 16 00:24:45 PDT 2014


On Saturday, 15 March 2014 at 22:56:19 UTC, Martin Nowak wrote:
> On 03/15/2014 11:04 PM, Martin Nowak wrote:
>> On 03/15/2014 09:50 PM, Martin Nowak wrote:
>>> I'm still investigating why it crashes when using 
>>> --export-dynamic
>>> though.
>>
>> Looks like a revenant of
>> https://d.puremagic.com/issues/show_bug.cgi?id=9729.
>> The problem is that nobody sets ebx before calling the 
>> interface thunk,
>> therefor resolving the @PLT entry fails.
>>
>> _TMP5   LABEL NEAR
>>         sub     eax, 8                                  ; 0078 
>> _ 83.
>> E8, 08
>>         jmp     _D6plugin6Plugin12saySomethingMFZAya    ; 007B 
>> _ E9,
>> FFFFFFFC(PLT r)
>>
>
> I prepared a fix here 
> (https://github.com/MartinNowak/dmd/tree/thunkEBX)
> but it needs more work. Currently it violates the platform ABI 
> because the interface thunk destroys EBX.

Thanks Martin - it's good to have you involved. I'd got as far as 
dissasembling it and stepping single instructions in GDB while 
looking at that, so I could have told you where it crashed, but 
had no idea what was going on



More information about the Digitalmars-d mailing list