diff options
| author | Shenghou Ma <minux@golang.org> | 2016-02-23 01:26:50 -0500 |
|---|---|---|
| committer | Minux Ma <minux@golang.org> | 2016-02-24 02:07:17 +0000 |
| commit | 1439158120742e5f41825de90a76b680da64bf76 (patch) | |
| tree | 25147abe938a44e3ed08c42817ead698bc99061b /src/syscall | |
| parent | 5c096cc092013331022c33c5e3d31228edd17dab (diff) | |
| download | go-1439158120742e5f41825de90a76b680da64bf76.tar.xz | |
runtime, syscall: switch linux/386 to use int 0x80
Like bionic, musl also doesn't provide vsyscall helper in %gs:0x10,
and as int $0x80 is as fast as calling %gs:0x10, just use int $0x80
always.
Because we're no longer using vsyscall in VDSO, get rid of VDSO code
for linux/386 too.
Fixes #14476.
Change-Id: I00ec8652060700e0a3c9b524bfe3c16a810263f6
Reviewed-on: https://go-review.googlesource.com/19833
Run-TryBot: Minux Ma <minux@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/syscall')
| -rw-r--r-- | src/syscall/asm_linux_386.s | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/syscall/asm_linux_386.s b/src/syscall/asm_linux_386.s index c94060571b..228a542cf1 100644 --- a/src/syscall/asm_linux_386.s +++ b/src/syscall/asm_linux_386.s @@ -12,18 +12,9 @@ // func Syscall(trap uintptr, a1, a2, a3 uintptr) (r1, r2, err uintptr); // Trap # in AX, args in BX CX DX SI DI, return in AX -// Most linux systems use glibc's dynamic linker, which puts the -// __kernel_vsyscall vdso helper at 0x10(GS) for easy access from position -// independent code and setldt in runtime does the same in the statically -// linked case. Android, however, uses bionic's dynamic linker, which does not -// save the helper anywhere, and so the only way to invoke a syscall from -// position independent code is boring old int $0x80 (which is also what -// bionic's syscall wrappers use). -#ifdef GOOS_android +// See ../runtime/sys_linux_386.s for the reason why we always use int 0x80 +// instead of the glibc-specific "CALL 0x10(GS)". #define INVOKE_SYSCALL INT $0x80 -#else -#define INVOKE_SYSCALL CALL 0x10(GS) -#endif TEXT ·Syscall(SB),NOSPLIT,$0-28 CALL runtime·entersyscall(SB) |
