]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1.10] runtime: add symbol for AT_FDCWD on Linux amd64 and mips64x
authorTobias Klauser <tklauser@distanz.ch>
Tue, 13 Feb 2018 16:07:54 +0000 (17:07 +0100)
committerAndrew Bonventre <andybons@golang.org>
Thu, 29 Mar 2018 06:08:12 +0000 (06:08 +0000)
Also order the syscall number list by numerically for mips64x.

Follow-up for CL 92895.

Change-Id: I5f01f8c626132a06160997fce8a2aef0c486bb1c
Reviewed-on: https://go-review.googlesource.com/93616
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/103035
Run-TryBot: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/sys_linux_amd64.s
src/runtime/sys_linux_mips64x.s

index 017e7dcaefb6138b9e36dbb7b7475ff8ffe79fd0..576a91a85ca4bea4d981c9fb6a334006fa0c1d8c 100644 (file)
@@ -10,6 +10,8 @@
 #include "go_tls.h"
 #include "textflag.h"
 
+#define AT_FDCWD -100
+
 #define SYS_read               0
 #define SYS_write              1
 #define SYS_close              3
@@ -66,7 +68,7 @@ TEXT runtime·exitThread(SB),NOSPLIT,$0-8
 
 TEXT runtime·open(SB),NOSPLIT,$0-20
        // This uses openat instead of open, because Android O blocks open.
-       MOVL    $-100, DI // AT_FDCWD, so this acts like open
+       MOVL    $AT_FDCWD, DI // AT_FDCWD, so this acts like open
        MOVQ    name+0(FP), SI
        MOVL    mode+8(FP), DX
        MOVL    perm+12(FP), R10
@@ -601,7 +603,7 @@ TEXT runtime·settls(SB),NOSPLIT,$32
        // Same as in sys_darwin_386.s:/ugliness, different constant.
        // DI currently holds m->tls, which must be fs:0x1d0.
        // See cgo/gcc_android_amd64.c for the derivation of the constant.
-       SUBQ    $0x1d0, DI  // In android, the tls base 
+       SUBQ    $0x1d0, DI  // In android, the tls base
 #else
        ADDQ    $8, DI  // ELF wants to use -8(FS)
 #endif
index 2cb365074e5e77f9c22f3bc44f57ba9a78531693..be0f2ca1e6757efc25961ff2b836ff5a674868c5 100644 (file)
 #include "go_tls.h"
 #include "textflag.h"
 
+#define AT_FDCWD -100
+
 #define SYS_exit               5058
 #define SYS_read               5000
 #define SYS_write              5001
-#define SYS_openat             5247
 #define SYS_close              5003
 #define SYS_getpid             5038
 #define SYS_kill               5060
@@ -42,6 +43,7 @@
 #define SYS_exit_group         5205
 #define SYS_epoll_create       5207
 #define SYS_epoll_ctl          5208
+#define SYS_openat             5247
 #define SYS_epoll_pwait                5272
 #define SYS_clock_gettime      5222
 #define SYS_epoll_create1      5285
@@ -68,7 +70,7 @@ TEXT runtime·exitThread(SB),NOSPLIT,$-8-8
 
 TEXT runtime·open(SB),NOSPLIT|NOFRAME,$0-20
        // This uses openat instead of open, because Android O blocks open.
-       MOVW    $-100, R4 // AT_FDCWD, so this acts like open
+       MOVW    $AT_FDCWD, R4 // AT_FDCWD, so this acts like open
        MOVV    name+0(FP), R5
        MOVW    mode+8(FP), R6
        MOVW    perm+12(FP), R7