MORE OFFTOPIC Re: I've just released Vasaro

Iain Buclaw ibuclaw at
Tue Dec 11 11:13:25 UTC 2018

On Tuesday, 11 December 2018 at 10:30:54 UTC, Jacob Carlborg 
> On 2018-12-10 12:26, Iain Buclaw wrote:
>> Is there any consideration apart from section/tls support?
> There's the backtrace implementation for exceptions as well, 
> "rt.backtrace". I had to slight modify the DMD backend to get 
> that to work the same as it does on Linux and FreeBSD. I've 
> documented how it's implemented in the commit message [1].

We're covered by libbacktrace, rather than tthe druntime 

>> I'm just going to fork the current rt.sections stuff (I.e: 
>> gcc.sections.{elf,macho,pef,x off}) as apart from linux/elf, 
>> the rest is not of any use or is specific to dmd object format.
> You should be able to reuse most parts of rt.sections_osx_x86. 
> I don't think there's anything in that file that won't work on 
> x86-64. But you would need to adjust it for the TLS 
> implementation you're using.

Unlike dmd, we don't really have full control over how things end 
up in the object.  There are a couple coaxing methods used which 
allowed us to use elf_shared without modification.  Other object 
formats I don't think we'll be so lucky over.

I'll try really hard though to keep the same implementation used 
for elf in others however - just different section names 
depending on what is accepted by the assembler.

>> As for tls, well  there is still no native support in gcc if I 
>> understand correctly.
> It was pretty straight forward (once I figured it out :) ) to 
> implement in DMD and it's pretty well documented you want to 
> implement it in GCC.

I'll leave that to the binutils people.  Supporting emutls also 
means we'll work on mingw too, which has a similar say story 
regarding state of native tls.

Besides, it will only work for newer OSX releases, not ~10.5 
which is roughly the base version aimed to support.

More information about the Digitalmars-d-announce mailing list