diff options
Diffstat (limited to 'src/thread')
-rw-r--r-- | src/thread/x32/__set_thread_area.s | 2 | ||||
-rw-r--r-- | src/thread/x32/__unmapself.s | 4 | ||||
-rw-r--r-- | src/thread/x32/clone.s | 6 | ||||
-rw-r--r-- | src/thread/x32/syscall_cp.s | 6 |
4 files changed, 8 insertions, 10 deletions
diff --git a/src/thread/x32/__set_thread_area.s b/src/thread/x32/__set_thread_area.s index f3ff4f61..94bc3630 100644 --- a/src/thread/x32/__set_thread_area.s +++ b/src/thread/x32/__set_thread_area.s @@ -5,6 +5,6 @@ __set_thread_area: mov %rdi,%rsi /* shift for syscall */ movl $0x1002,%edi /* SET_FS register */ - movl $158,%eax /* set fs segment to */ + movl $0x4000009e,%eax /* set fs segment to */ syscall /* arch_prctl(SET_FS, arg)*/ ret diff --git a/src/thread/x32/__unmapself.s b/src/thread/x32/__unmapself.s index e2689e65..d9254601 100644 --- a/src/thread/x32/__unmapself.s +++ b/src/thread/x32/__unmapself.s @@ -3,8 +3,8 @@ .global __unmapself .type __unmapself,@function __unmapself: - movl $11,%eax /* SYS_munmap */ + movl $0x4000000b,%eax /* SYS_munmap */ syscall /* munmap(arg2,arg3) */ xor %rdi,%rdi /* exit() args: always return success */ - movl $60,%eax /* SYS_exit */ + movl $0x4000003c,%eax /* SYS_exit */ syscall /* exit(0) */ diff --git a/src/thread/x32/clone.s b/src/thread/x32/clone.s index ee59903a..eed46151 100644 --- a/src/thread/x32/clone.s +++ b/src/thread/x32/clone.s @@ -2,8 +2,7 @@ .global __clone .type __clone,@function __clone: - xor %eax,%eax - mov $56,%al + movl $0x40000038,%eax /* SYS_clone */ mov %rdi,%r11 mov %rdx,%rdi mov %r8,%rdx @@ -20,8 +19,7 @@ __clone: pop %rdi call *%r9 mov %eax,%edi - xor %eax,%eax - mov $60,%al + movl $0x4000003c,%eax /* SYS_exit */ syscall hlt 1: ret diff --git a/src/thread/x32/syscall_cp.s b/src/thread/x32/syscall_cp.s index 788c53cc..70605c19 100644 --- a/src/thread/x32/syscall_cp.s +++ b/src/thread/x32/syscall_cp.s @@ -1,7 +1,7 @@ .text -.global __syscall_cp_asm -.type __syscall_cp_asm,@function -__syscall_cp_asm: +.global __syscall_cp_internal +.type __syscall_cp_internal,@function +__syscall_cp_internal: .global __cp_begin __cp_begin: |