File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -3233,6 +3233,20 @@ static void zend_jit_setup(void)
3233
3233
/* Index is offset by 1 on FreeBSD (https://github.com/freebsd/freebsd-src/blob/22ca6db50f4e6bd75a141f57cf953d8de6531a06/lib/libc/gen/tls.c#L88) */
3234
3234
tsrm_tls_index = (tlsdesc->index + 1) * 8;
3235
3235
}
3236
+ # elif defined(__MUSL__)
3237
+ if (tsrm_ls_cache_tcb_offset == 0) {
3238
+ size_t **where;
3239
+
3240
+ __asm__(
3241
+ "adrp %0, :tlsdesc:_tsrm_ls_cache\n"
3242
+ "add %0, %0, :tlsdesc_lo12:_tsrm_ls_cache\n"
3243
+ : "=r" (where));
3244
+ /* See https://github.com/ARM-software/abi-aa/blob/2a70c42d62e9c3eb5887fa50b71257f20daca6f9/aaelf64/aaelf64.rst */
3245
+ size_t *tlsdesc = where[1];
3246
+
3247
+ tsrm_tls_offset = tlsdesc[1];
3248
+ tsrm_tls_index = tlsdesc[0] * 8;
3249
+ }
3236
3250
# else
3237
3251
ZEND_ASSERT(tsrm_ls_cache_tcb_offset != 0);
3238
3252
# endif
You can’t perform that action at this time.
0 commit comments