• Michael Munday's avatar
    syscall: add support for s390x · af74dca4
    Michael Munday authored
    On s390x char is unsigned. We cannot force it to be signed using
    -fsigned-char (see arm64) because the s390x gccgo API is already
    public and we need to stick as closely as possible to it to avoid
    breaking existing projects. In order to match the gccgo API we
    also force the RawSockaddr.Data and RawSockaddrUnix.Path fields
    to be signed.
    
    This CL adds a post-processing pass (mkpost.go) to mkall.sh in
    order to export the types of fields in PtraceRegs on s390x
    without affecting the API on other platforms. The types of these
    fields match their counterparts in gccgo. mkpost.go also cleans
    up the Pad_cgo* fields and X_* fields (these fields are not
    exported by gccgo currently). It could be extended to add build
    tags on platforms that need them.
    
    Change-Id: I66bdf5b86ec98af70baf666989027bb354df9e3e
    Reviewed-on: https://go-review.googlesource.com/20961Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    af74dca4
syscall_linux_s390x.go 8.35 KB