forked from CHatingPython/towos
feat: load GDT
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
.section .text
|
||||
.code64
|
||||
|
||||
.global reload_segments
|
||||
.type reload_segments, @function
|
||||
|
||||
reload_segments:
|
||||
pushq %rdi
|
||||
leaq .reload_cs(%rip), %rax
|
||||
pushq %rax
|
||||
lretq
|
||||
.reload_cs:
|
||||
movw %si, %ax
|
||||
movw %ax, %ds
|
||||
movw %ax, %es
|
||||
movw %ax, %fs
|
||||
movw %ax, %gs
|
||||
movw %ax, %ss
|
||||
ret
|
||||
Reference in New Issue
Block a user