• Elias Naur's avatar
    cmd/link/internal/ld,syscall: drop $INODE64 suffixes on simulators · 096ab3c2
    Elias Naur authored
    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: default avatarKeith Randall <khr@golang.org>
    096ab3c2
syscall_darwin_amd64.go 1.84 KB