aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2014-10-02 17:56:50 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2014-10-02 17:56:50 +0000
commit4e3bba8fc39cc53c374f68c17763e9928f322847 (patch)
treefa6fc7520e032c89d2f23cfca10d940c992c4ee3 /gcc/go
parentb177d7bf118d1e6c22e2852e96b247608a2a547e (diff)
downloadgcc-4e3bba8fc39cc53c374f68c17763e9928f322847.zip
gcc-4e3bba8fc39cc53c374f68c17763e9928f322847.tar.gz
gcc-4e3bba8fc39cc53c374f68c17763e9928f322847.tar.bz2
re PR go/61880 (Linking with external functions in C does not work in GO when using gccgo, while it works in gc)
PR go/61880 compiler: symbol names should have '.' replaced with '_' Package and symbol names issued by the cgo tool and compiler should be the same for the object files to link. A minimal change to fix only: https://code.google.com/p/gofrontend/issues/detail?id=36 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61880 From-SVN: r215810
Diffstat (limited to 'gcc/go')
-rw-r--r--gcc/go/gofrontend/gogo.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc
index dcc2ae6..81a555f 100644
--- a/gcc/go/gofrontend/gogo.cc
+++ b/gcc/go/gofrontend/gogo.cc
@@ -258,10 +258,7 @@ Gogo::pkgpath_for_symbol(const std::string& pkgpath)
char c = s[i];
if ((c >= 'a' && c <= 'z')
|| (c >= 'A' && c <= 'Z')
- || (c >= '0' && c <= '9')
- || c == '_'
- || c == '.'
- || c == '$')
+ || (c >= '0' && c <= '9'))
;
else
s[i] = '_';