* libgo patch committed: Export cgoCheck functions
@ 2017-12-02 0:46 Ian Lance Taylor
0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2017-12-02 0:46 UTC (permalink / raw)
To: gcc-patches, gofrontend-dev
[-- Attachment #1: Type: text/plain, Size: 489 bytes --]
This patch to libgo exports the cgoCheck functions. The functions
cgoCheckPointer and cgoCheckResult are called by code generated by
cgo. That means that we need to export them using go:linkname, as
otherwise they are local symbols. The cgo code currently uses weak
references to only call the symbols if they are defined, which is why
it has been working--the cgo code has not been doing any checks.
Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed
to mainline.
Ian
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 906 bytes --]
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE (revision 255346)
+++ gcc/go/gofrontend/MERGE (working copy)
@@ -1,4 +1,4 @@
-1949a203fca0c8bde6f2690ebc36427c5e3953c7
+338f7434175bb71f3c8905e9ad7f480aec3afee6
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
Index: libgo/go/runtime/cgocall.go
===================================================================
--- libgo/go/runtime/cgocall.go (revision 255340)
+++ libgo/go/runtime/cgocall.go (working copy)
@@ -11,6 +11,10 @@ import (
"unsafe"
)
+// Functions called by cgo-generated code.
+//go:linkname cgoCheckPointer runtime.cgoCheckPointer
+//go:linkname cgoCheckResult runtime.cgoCheckResult
+
// Pointer checking for cgo code.
// We want to detect all cases where a program that does not use
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-12-02 0:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-02 0:46 libgo patch committed: Export cgoCheck functions Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).