1
0
mirror of https://github.com/golang/go synced 2024-11-23 08:20:05 -07:00
go/misc/cgo
David Crawshaw ab5a2173f9 cmd/link: limit darwin dynlink symbol exports
The pclntable contains pointers to functions. If the function symbol
is exported in a plugin, and there is a matching symbol in the host
binary, then the pclntable of a plugin ends up pointing at the
function in the host module.

This doesn't work because the traceback code expects the pointer to
be in the same module space as the PC value.

So don't export functions that might overlap with the host binary.
This way the pointer stays in its module.

Updates #18190

Change-Id: Ifb77605b35fb0a1e7edeecfd22b1e335ed4bb392
Reviewed-on: https://go-review.googlesource.com/34196
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-12-10 17:03:45 +00:00
..
errors cmd/cgo: run cgo pointer checks for pointer to union 2016-11-15 17:10:52 +00:00
fortran misc/cgo/fortran: fix gfortran compile test 2016-05-04 15:08:16 +00:00
gmp all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
life all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
nocgo cmd/ld: really import runtime/cgo for external link 2014-05-20 21:36:50 -07:00
stdio all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00
test misc/cgo/test: skip test18146 on Darwin 2016-12-07 05:02:32 +00:00
testasan runtime: more flexible heap memory mapping on 64-bits 2013-06-12 18:47:16 +04:00
testcarchive Revert "runtime: handle SIGPIPE in c-archive and c-shared programs" 2016-12-01 11:23:17 +00:00
testcshared misc/cgo/testcshared: add explicit ./ to shared library argument 2016-11-19 04:31:36 +00:00
testgodefs cmd/cgo: add -srcdir option 2016-10-30 19:14:08 +00:00
testplugin cmd/link: limit darwin dynlink symbol exports 2016-12-10 17:03:45 +00:00
testsanitizers runtime/cgo: use libc for sigaction syscalls when possible 2016-11-16 05:38:38 +00:00
testshared cmd/link: do not mark go.plugin.tabs as reachable in non-plugins 2016-12-08 20:01:23 +00:00
testsigfwd misc/cgo/testsigfwd: add missing return statement 2016-08-30 21:44:14 +00:00
testso cmd/dist: convert testso test into Go 2015-06-12 04:33:50 +00:00
testsovar misc/cgo/testsovar: needs the extern keyword to export variables on non-windows platforms 2015-07-21 18:10:57 +00:00
testtls all: make copyright headers consistent with one space after period 2016-05-02 13:43:18 +00:00