Add triple underscore tls_get_addr for x86

This commit is contained in:
Jeremy Soller
2022-07-22 19:35:59 -06:00
parent abe30ba884
commit afb5094cda
+7
View File
@@ -38,3 +38,10 @@ pub unsafe extern "C" fn __tls_get_addr(ti: *mut dl_tls_index) -> *mut c_void {
(*ti).ti_offset
);
}
// x86 can define a version that does not require stack alignment
#[cfg(target_arch = "x86")]
#[no_mangle]
pub unsafe extern "C" fn ___tls_get_addr(ti: *mut dl_tls_index) -> *mut c_void {
__tls_get_addr(ti)
}