-
Notifications
You must be signed in to change notification settings - Fork 29
Fix issue 20019: Symbol not found: _dyld_enumerate_tlv_storage on macOS 10.15 #172
Fix issue 20019: Symbol not found: _dyld_enumerate_tlv_storage on macOS 10.15 #172
Conversation
The correct branch for 0.17.x is |
Thanks @kinke . Updated. |
@kinke Any idea who can review this? It's blocking the bootstrap process on MacOS 10.15 |
This otherwise looks alright to me. |
…OS 10.15 Ported from 378fc6d The symbol `dyld_enumerate_tlv_storage` has been used to iterate all the thread local storage addresses and registered them as roots with the garbage collector. The symbol has always been a private symbol, not part of the public API. In the latest version of macOS, 10.15 it has been removed. This replaces the usage of `dyld_enumerate_tlv_storage` by manually iterating the TLV sections of all images and get key that the dynamic loader has setup for each TLS symbol. The key is then used to get the base address of the TLV storage.
24b2d95
to
f724c08
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will merge it tomorrow if @kinke doesn't get to it first. N.B you will want to do an ldc-developers/ldc
ltsmaster PR to update its runtime/druntime
git submodule.
@lionello: If you care about the nixOS package, then it'd be worthwhile to try to overcome the bootstrapping via ltsmaster (via GDC or the previous LDC package if possible). If that's somehow not possible, then an intermediate compiler should be used to compile itself for the final binaries; an |
@kinke Yeah I mostly use D through Nix and this blocked me since the update to Catalina. What I planned to do is to make the bootstrapping more configurable by having both |
@thewilsonator please see ldc-developers/ldc#3337 |
…OS 10.15 (#172) Fix issue 20019: Symbol not found: _dyld_enumerate_tlv_storage on macOS 10.15 Ported from 378fc6d The symbol `dyld_enumerate_tlv_storage` has been used to iterate all the thread local storage addresses and registered them as roots with the garbage collector. The symbol has always been a private symbol, not part of the public API. In the latest version of macOS, 10.15 it has been removed. This replaces the usage of `dyld_enumerate_tlv_storage` by manually iterating the TLV sections of all images and get key that the dynamic loader has setup for each TLS symbol. The key is then used to get the base address of the TLV storage.
@kinke Re: Nix bootstrapping, I made this PR: NixOS/nixpkgs#82694 |
Ported from 378fc6d
The symbol
dyld_enumerate_tlv_storage
has been used to iterate allthe thread local storage addresses and registered them as roots with
the garbage collector.
The symbol has always been a private symbol, not part of the public
API. In the latest version of macOS, 10.15 it has been removed.
This replaces the usage of
dyld_enumerate_tlv_storage
by manuallyiterating the TLV sections of all images and get key that the dynamic
loader has setup for each TLS symbol. The key is then used to get the
base address of the TLV storage.