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].

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.

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.

[1] https://github.com/dlang/dmd/commit/2bf7d0db29416eacbb01a91e6502140e354ee0ef

--
/Jacob Carlborg

Reply via email to