Commit 7e481f89 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

restore: Add GS-TLS handling

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@gmail.com>
parent da8f61c1
...@@ -336,7 +336,14 @@ self_len_end: ...@@ -336,7 +336,14 @@ self_len_end:
* once program restored). * once program restored).
*/ */
ret = sys_arch_prctl(ARCH_SET_FS, ret = sys_arch_prctl(ARCH_SET_FS,
&core_entry.u.arch.tls_array[0].base_addr); &core_entry.u.arch.tls_array[FS_TLS].base_addr);
if (ret) {
write_hex_n(__LINE__);
write_hex_n(ret);
goto core_restore_end;
}
ret = sys_arch_prctl(ARCH_SET_GS,
&core_entry.u.arch.tls_array[GS_TLS].base_addr);
if (ret) { if (ret) {
write_hex_n(__LINE__); write_hex_n(__LINE__);
write_hex_n(ret); write_hex_n(ret);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment