Browse Source

[LibOS] syscallas.S: Reference shim_table through GOT

libsysdb.so is compiled as pic.
Isaku Yamahata 6 years ago
parent
commit
08d0866850
1 changed files with 1 additions and 1 deletions
  1. 1 1
      LibOS/shim/src/syscallas.S

+ 1 - 1
LibOS/shim/src/syscallas.S

@@ -45,7 +45,7 @@ syscalldb:
         cmp $LIBOS_SYSCALL_BOUND, %rax
         cmp $LIBOS_SYSCALL_BOUND, %rax
         jae isundef
         jae isundef
 
 
-        leaq shim_table(%rip), %rbx
+        movq shim_table@GOTPCREL(%rip), %rbx
         movq (%rbx,%rax,8), %rbx
         movq (%rbx,%rax,8), %rbx
         cmp $0, %rbx
         cmp $0, %rbx
         je isundef
         je isundef