This week's experiment build gdc with tls disabled.
Jacob Carlborg
doob at me.com
Thu Dec 19 23:43:12 PST 2013
On 2013-12-19 18:59, David Nadlinger wrote:
> That is pretty much how it is done in DMD and LDC as well. The only
> difference is that instead of modifying the linker scripts to
> accommodate this, we emit the ModuleInfo references to custom sections.
> The GNU toolchain (and we are in highly system-specific territory here
> anyway) never changes the order of custom sections, which you can also
> verify using __attribute__((section("...))) in GCC. Thus, if you emit
> your relevant symbols into three sections like this,
Does that really work reliably? As far as I remember, the trick with
brackting sections doesn't work on Mac OS X. DMD had some problems with
that. It basically broke on every new major release of Mac OS X, the
linker changed all the time. If I recall correctly it either removed the
empty sections or reordered the sections.
But the dynamic linker on Mac OS X has an API to access these sections
easily anyway.
--
/Jacob Carlborg
More information about the D.gnu
mailing list