• Michael Hudson-Doyle's avatar
    cmd/internal/obj, runtime: fixes for defer in 386 shared libraries · 26849746
    Michael Hudson-Doyle authored
    Any defer in a shared object crashed when GOARCH=386. This turns out to be two
    bugs:
    
     1) Calls to morestack were not processed to be PIC safe (must have been
        possible to trigger this another way too)
     2) jmpdefer needs to rewind the return address of the deferred function past
        the instructions that load the GOT pointer into BX, not just past the call
    
    Bug 2) requires re-introducing the a way for .s files to know when they are
    being compiled for dynamic linking but I've tried to do that in as minimal
    a way as possible.
    
    Fixes #15916
    
    Change-Id: Ia0d09b69ec272a176934176b8eaef5f3bfcacf04
    Reviewed-on: https://go-review.googlesource.com/23623
    Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    26849746
Name
Last commit
Last update
..
addr2line Loading commit data...
api Loading commit data...
asm Loading commit data...
cgo Loading commit data...
compile Loading commit data...
cover Loading commit data...
dist Loading commit data...
doc Loading commit data...
fix Loading commit data...
go Loading commit data...
gofmt Loading commit data...
internal Loading commit data...
link Loading commit data...
nm Loading commit data...
objdump Loading commit data...
pack Loading commit data...
pprof Loading commit data...
trace Loading commit data...
vendor Loading commit data...
vet Loading commit data...
yacc Loading commit data...