[Dlang-internal] A Proof of Concept for the baremetal D runtime plans

mbalantz arbofo at hotmail.com
Sat May 4 03:06:40 UTC 2019


On 2019-05-03 6:15 p.m., mbalantz wrote:
> On 2019-05-03 5:30 p.m., Mike Franklin wrote:
> 
>> I donwloaded your code again, and the pongd.exe file contains a 
>> trojan:Win32/Fuery.!cl.  Not sure if that's a false positive, but it 
>> certainly wasn't encouraging.
>>
> 
> Yes, I realize there's something funny going on every time I compile the 
> pongd.d file on my Windows box. I once took a look at the assembly of 
> one of the pongd.exe's I compiled and saw that control flow quickly 
> proceeded to a buffer overflow. That occurred during one of my builds, 
> wasn't sure if it was going to happen again or for anyone else. Sorry 
> for that trouble.
> 
> 
>> I see the message from optlink.  This is a linker (created by Walter, 
>> I think) that is used to link 32-bit code on Windows. Try compiling 
>> with -w64 instead.  -w64 will create a 64-bit binary and will use 
>> either LLVM's linker or Visual Studio's linker depending on which one 
>> it finds first.
>>
>> Next, I see you are compiling pongd.d, but you're not compiling the 
>> code in the bindbc directory and I think that is the source of your 
>> linker errors.  You'll need to compile the bindbc directory to object 
>> code and link that in to you final executable.
>>
>> Mike
> 
> Going to work on it. Again, sorry for that possible virus. I have to 
> clean up my computer, not trying to spread viruses around.
> 
> Thank you,
> Mark
> 

Hello Mike and D community,

-w64 didn't work in my installation, perhaps if you please provide me a 
list of steps with -w64 in it, it may succeed? Also, my 
C:\D\dmd2\windows\bin64 directory only contains one file, libcurl.dll. 
Therefore maybe this is why -w64 is not found.

I share two files here (I got rid of the one flagged likely erroneously 
as a trojan): one is a text file showing output of steps I performed 
after trying to link all the object files in my bindbc directory along 
with the pongd.obj; and I put here a link to a zip archive of the build 
directory WITHOUT the .exe, which does in fact still get created after 
optlink, for security reasons.

https://drive.google.com/file/d/1HD6tbm0xUJBjYON6y6JSTqZl3JDSz6f3/view?usp=sharing

^^(linkall-pongd-output.txt)

https://drive.google.com/file/d/1eHMtxVKmxwgYzqeOwgcNZWdnltqZPiHh/view?usp=sharing

^^ pong-in-d.zip

I might have to start a new thread as this is getting less and less 
about trying to demo against baremetal and more about getting my pong 
file to compile/be ported into D, of which I'd still have some interest.

Thank you,
Mark


More information about the Dlang-internal mailing list