• Keith Randall's avatar
    cmd/compile: allow bodyless function if it is linkname'd · ca374923
    Keith Randall authored
    In assembly free packages (aka "complete" or "pure go"), allow
    bodyless functions if they are linkname'd to something else.
    
    Presumably the thing the function is linkname'd to has a definition.
    If not, the linker will complain. And linkname is unsafe, so we expect
    users to know what they are doing.
    
    Note this handles only one direction, where the linkname directive
    is in the local package. If the linkname directive is in the remote
    package, this CL won't help. (See os/signal/sig.s for an example.)
    
    Fixes #23311
    
    Change-Id: I824361b4b582ee05976d94812e5b0e8b0f7a18a6
    Reviewed-on: https://go-review.googlesource.com/c/151318
    Run-TryBot: Keith Randall <khr@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
    ca374923
Name
Last commit
Last update
..
asm_aix_ppc64.s Loading commit data...
asm_solaris.s Loading commit data...
at.go Loading commit data...
at_aix.go Loading commit data...
at_darwin.go Loading commit data...
at_freebsd.go Loading commit data...
at_libc.go Loading commit data...
at_solaris.go Loading commit data...
at_sysnum_darwin.go Loading commit data...
at_sysnum_dragonfly.go Loading commit data...
at_sysnum_fstatat64_linux.go Loading commit data...
at_sysnum_fstatat_linux.go Loading commit data...
at_sysnum_linux.go Loading commit data...
at_sysnum_netbsd.go Loading commit data...
at_sysnum_newfstatat_linux.go Loading commit data...
at_sysnum_openbsd.go Loading commit data...
getentropy_openbsd.go Loading commit data...
getrandom_freebsd.go Loading commit data...
getrandom_linux.go Loading commit data...
getrandom_linux_386.go Loading commit data...
getrandom_linux_amd64.go Loading commit data...
getrandom_linux_arm.go Loading commit data...
getrandom_linux_generic.go Loading commit data...
getrandom_linux_mips64x.go Loading commit data...
getrandom_linux_mipsx.go Loading commit data...
getrandom_linux_ppc64x.go Loading commit data...
getrandom_linux_s390x.go Loading commit data...
ioctl_aix.go Loading commit data...
nonblocking.go Loading commit data...
nonblocking_darwin.go Loading commit data...
nonblocking_js.go Loading commit data...
nonblocking_nacl.go Loading commit data...