Commit 01e9dbf
Disable TLS optimization for musl riscv64 (#121662)
On linux-musl-riscv64, when corehost (dotnet) dlopen()s libcoreclr, we
get:
> \# dotnet --version
> Failed to load
/root/.dotnet/shared/Microsoft.NETCore.App/10.0.0-rtm.25564.199/libcoreclr.so,
error: Error relocating
/root/.dotnet/shared/Microsoft.NETCore.App/10.0.0-rtm.25564.199/libcoreclr.so:
Uq???&?J?N?R?V?Z? .????: initial-exec TLS resolves to dynamic definition
in
/root/.dotnet/shared/Microsoft.NETCore.App/10.0.0-rtm.25564.199/libcoreclr.so
Failed to bind to CoreCLR at
'/root/.dotnet/shared/Microsoft.NETCore.App/10.0.0-rtm.25564.199/'
Failed to create CoreCLR, HRESULT: 0x80008088
musl maintainer described the issue on this golang thread:
golang/go#54805 (comment). When
I tried
`LD_PRELOAD=/root/.dotnet/shared/Microsoft.NETCore.App/10.0.0-rtm.25564.199/libcoreclr.so
dotnet --version`, it started working and SDK started working.
By disabling the optimization as we have done for linux-musl-arm64 and
removing `la.tls.ie` from binary works without the `LD_PRELOAD` hack.
---------
Co-authored-by: Jan Kotas <[email protected]>1 parent 776e86a commit 01e9dbf
2 files changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
848 | 848 | | |
849 | 849 | | |
850 | 850 | | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
851 | 854 | | |
852 | 855 | | |
853 | 856 | | |
854 | 857 | | |
| 858 | + | |
855 | 859 | | |
856 | 860 | | |
857 | 861 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
917 | 917 | | |
918 | 918 | | |
919 | 919 | | |
| 920 | + | |
| 921 | + | |
920 | 922 | | |
921 | 923 | | |
922 | 924 | | |
| |||
1096 | 1098 | | |
1097 | 1099 | | |
1098 | 1100 | | |
| 1101 | + | |
| 1102 | + | |
1099 | 1103 | | |
| 1104 | + | |
1100 | 1105 | | |
1101 | 1106 | | |
1102 | 1107 | | |
| |||
0 commit comments