]> Cypherpunks repositories - gostls13.git/commit
cmd/link/internal/ld,syscall: drop $INODE64 suffixes on simulators
authorElias Naur <mail@eliasnaur.com>
Sat, 27 Apr 2019 09:36:40 +0000 (11:36 +0200)
committerElias Naur <mail@eliasnaur.com>
Sat, 27 Apr 2019 21:47:07 +0000 (21:47 +0000)
commit096ab3c21b88ccc7d411379d09fe6274e3159467
tree128d72f3fb757d15e13b50f1528d8b6139176349
parenta74e01204e08c51792a4f6a238762352e971efea
cmd/link/internal/ld,syscall: drop $INODE64 suffixes on simulators

Some libc functions are suffixed with "$INODE64" on macOS.
Unfortunately, the iOS simulator doesn't have the suffixes, so we can't
use GOARCH to distinguish the two platform.

Add linker support for adding the suffix, using the macho platform
to determine whether it is needed.

While here, add the correct suffix for fdopendir on 386. It's
"$INODE64$UNIX2003", believe it or not. Without the suffix,

GOARCH=386 go test -short syscall

crashes on my Mojave machine.

Fixes #31447

Change-Id: I9bd3de40ece7df62f744bc24cd00909e56b00b78
Reviewed-on: https://go-review.googlesource.com/c/go/+/174199
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/link/internal/ld/macho.go
src/syscall/mksyscall.pl
src/syscall/syscall_darwin.go
src/syscall/syscall_darwin_386.go
src/syscall/syscall_darwin_amd64.go
src/syscall/syscall_darwin_arm.go
src/syscall/syscall_darwin_arm64.go
src/syscall/zsyscall_darwin_386.go
src/syscall/zsyscall_darwin_amd64.go
src/syscall/zsyscall_darwin_arm.s
src/syscall/zsyscall_darwin_arm64.s