| 1 | /* Copyright 2011-2012 Nicholas J. Kain, licensed under standard MIT license */ |
| 2 | .text |
| 3 | .global __set_thread_area |
| 4 | .hidden __set_thread_area |
| 5 | .type __set_thread_area,@function |
| 6 | __set_thread_area: |
| 7 | 	mov %rdi,%rsi /* shift for syscall */ |
| 8 | 	movl $0x1002,%edi /* SET_FS register */ |
| 9 | 	movl $158,%eax /* set fs segment to */ |
| 10 | 	syscall /* arch_prctl(SET_FS, arg)*/ |
| 11 | 	ret |