go/misc/cgo/testshared/src
Michael Hudson-Doyle 26849746c9 cmd/internal/obj, runtime: fixes for defer in 386 shared libraries
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: Ian Lance Taylor <iant@golang.org>
2016-06-03 02:50:27 +00:00
..
dep2 cmd/link: always read type data for dynimport symbols 2016-05-04 07:13:01 +00:00
dep3 cmd/link: always read type data for dynimport symbols 2016-05-04 07:13:01 +00:00
depBase cmd/internal/obj, runtime: fixes for defer in 386 shared libraries 2016-06-03 02:50:27 +00:00
exe cmd/link: always read type data for dynimport symbols 2016-05-04 07:13:01 +00:00
exe2 cmd/compile: do not generate tail calls when dynamic linking on ppc64le 2016-06-02 02:34:01 +00:00
exe3 cmd/link: always read type data for dynimport symbols 2016-05-04 07:13:01 +00:00
execgo cmd/link: when reading symbols from a shared library, allow duplicates when they are both in bss 2015-06-16 22:33:36 +00:00
explicit cmd/link: allow symbols from .a files to override those from .so files 2016-01-20 19:53:53 +00:00
implicit cmd/link: allow symbols from .a files to override those from .so files 2016-01-20 19:53:53 +00:00
implicitcmd cmd/link: allow symbols from .a files to override those from .so files 2016-01-20 19:53:53 +00:00
trivial