• Austin Clements's avatar
    runtime: correct ABI information for all functions · af1bfe0a
    Austin Clements authored
    There are three cases where we don't currently have the visibility to
    get the ABIs of runtime symbols right, which this CL fixes:
    
    1. For Go functions referenced from non-Go code in other packages.
       This is runtime.morestackc (which is referenced from function
       prologues) and a few syscall symbols. For these we need to generate
       ABI0 wrappers, so this CL adds dummy calls in the assembly code to
       force wrapper generation. There are many other cross-package
       references to runtime and runtime/internal/atomic, but these are
       handled specially by cmd/go.
    
    2. For calls generated by the compiler to runtime Go functions, there
       are a few symbols that aren't declared in builtins.go because we've
       never needed their type information before. Now we at least need
       their ABI information, so these are added to builtins.go.
    
    3. For calls generated by the compiler to runtime assembly functions,
       the compiler is going to assume the internal ABI is available, so
       we add Go stubs to the runtime to trigger wrapper generation. For
       these we're probably going to want to provide internal ABI
       definitions directly in the assembly for performance, but for now
       the ABIs are the same so it doesn't matter.
    
    For #27539.
    
    Change-Id: I9c224e7408d2ef4dd9b0e4c9d7e962ddfe111245
    Reviewed-on: https://go-review.googlesource.com/c/146822
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarKeith Randall <khr@golang.org>
    Reviewed-by: 's avatarMichael Knyszek <mknyszek@google.com>
    af1bfe0a
Name
Last commit
Last update
..
all Loading commit data...
internal Loading commit data...
testdata Loading commit data...
README Loading commit data...
asmdecl.go Loading commit data...
assign.go Loading commit data...
atomic.go Loading commit data...
bool.go Loading commit data...
buildtag.go Loading commit data...
cgo.go Loading commit data...
composite.go Loading commit data...
copylock.go Loading commit data...
dead.go Loading commit data...
deadcode.go Loading commit data...
doc.go Loading commit data...
httpresponse.go Loading commit data...
lostcancel.go Loading commit data...
main.go Loading commit data...
method.go Loading commit data...
nilfunc.go Loading commit data...
print.go Loading commit data...
rangeloop.go Loading commit data...
shadow.go Loading commit data...
shift.go Loading commit data...
structtag.go Loading commit data...
tests.go Loading commit data...
types.go Loading commit data...
unmarshal.go Loading commit data...
unsafeptr.go Loading commit data...
unused.go Loading commit data...
vet_test.go Loading commit data...