aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
authorNikhil Benesch <nikhil.benesch@gmail.com>2020-10-26 18:42:08 +0000
committerIan Lance Taylor <iant@golang.org>2020-10-28 18:20:50 -0700
commit0cdde1e7ae197366e17e5ef50bf68d4d5760df01 (patch)
tree35bfb1e6e1551c39558abb3b699b032e952823c4 /gcc/go
parente93aae4a497c38b46df818a629c78149fe6af24b (diff)
downloadgcc-0cdde1e7ae197366e17e5ef50bf68d4d5760df01.zip
gcc-0cdde1e7ae197366e17e5ef50bf68d4d5760df01.tar.gz
gcc-0cdde1e7ae197366e17e5ef50bf68d4d5760df01.tar.bz2
libgo: handle linking to NetBSD's versioned symbols
On NetBSD, for backwards compatibility, various libc symbols are renamed to a symbol with a version suffix. For example, this is the (abbreviated) definition of sigaction: int sigaction(...) __asm__ ("__sigaction14") This poses a challenge for libgo, which attempts to link sigaction by way of an "//extern" comment: //extern sigaction func sigaction(...) This results in a reference to the deprecated compatibility symbol "sigaction", rather than the desired "__sigaction14" symbol. This patch introduces a new "//extern-sysinfo" comment to handle this situation. The new mklinknames.awk script scans a package for these comments and outputs a "//go:linkname" directive that links the wrapper to the correct versioned symbol, as determined by parsing the __asm__ annotation on the function's declaration in gen-sysinfo.go. For now, only the following packages are scanned by mklinknames.awk: os os/user runtime syscall gotools/: * Makefile.am (check-runtime): Add runtime_linknames.go to --extrafiles. * Makefile.in: Regenerate. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/265125
Diffstat (limited to 'gcc/go')
-rw-r--r--gcc/go/gofrontend/MERGE2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 45aafaa..149f200 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-88a25df9133e9a1fc28a00b08ee30d7e5ab2cdbb
+ae20684902b82883d3d65f2cde0894c7cb3b995b
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.