aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/go-unsafe-pointer.c
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2018-01-24 23:50:09 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2018-01-24 23:50:09 +0000
commit4880b994d63ffb014a5a547239e9cd8402bb014a (patch)
treea782ef29045ab50de17cac215b8c30c9a3b61aa2 /libgo/runtime/go-unsafe-pointer.c
parentd3719ee2c078a1518c9e21efae0cf438d4ffb8d6 (diff)
downloadgcc-4880b994d63ffb014a5a547239e9cd8402bb014a.zip
gcc-4880b994d63ffb014a5a547239e9cd8402bb014a.tar.gz
gcc-4880b994d63ffb014a5a547239e9cd8402bb014a.tar.bz2
compiler: rationalize external symbol names
Encode all external symbol names using only ASCII alphanumeric characters, underscore, and dot. Use a scheme that can be reliably demangled to a somewhat readable version as described in the long comment in names.cc. A minor cleanup discovered during this was that we were treating function types as different if one had a NULL parameters_ field and another has a non-NULL parameters_ field that has no parameters. This worked because we mangled them slightly differently. We now mangle them the same, so we treat them as equal, as we should anyhow. Reviewed-on: https://go-review.googlesource.com/89555 * go.go-torture/execute/names-1.go: New test. From-SVN: r257033
Diffstat (limited to 'libgo/runtime/go-unsafe-pointer.c')
-rw-r--r--libgo/runtime/go-unsafe-pointer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libgo/runtime/go-unsafe-pointer.c b/libgo/runtime/go-unsafe-pointer.c
index 9df7f3a..5afd011 100644
--- a/libgo/runtime/go-unsafe-pointer.c
+++ b/libgo/runtime/go-unsafe-pointer.c
@@ -15,10 +15,10 @@
descriptor. */
extern const struct __go_type_descriptor unsafe_Pointer
- __asm__ (GOSYM_PREFIX "__go_tdn_unsafe.Pointer");
+ __asm__ (GOSYM_PREFIX "unsafe.Pointer..d");
extern const byte unsafe_Pointer_gc[]
- __asm__ (GOSYM_PREFIX "__go_tdn_unsafe.Pointer$gc");
+ __asm__ (GOSYM_PREFIX "unsafe.Pointer..g");
/* Used to determine the field alignment. */
struct field_align
@@ -38,9 +38,9 @@ static const String reflection_string =
const byte unsafe_Pointer_gc[] = { 1 };
extern const FuncVal runtime_pointerhash_descriptor
- __asm__ (GOSYM_PREFIX "runtime.pointerhash$descriptor");
+ __asm__ (GOSYM_PREFIX "runtime.pointerhash..f");
extern const FuncVal runtime_pointerequal_descriptor
- __asm__ (GOSYM_PREFIX "runtime.pointerequal$descriptor");
+ __asm__ (GOSYM_PREFIX "runtime.pointerequal..f");
const struct __go_type_descriptor unsafe_Pointer =
{
@@ -75,7 +75,7 @@ const struct __go_type_descriptor unsafe_Pointer =
it to be defined elsewhere. */
extern const struct __go_ptr_type pointer_unsafe_Pointer
- __asm__ (GOSYM_PREFIX "__go_td_pN14_unsafe.Pointer");
+ __asm__ (GOSYM_PREFIX "type...1unsafe.Pointer");
/* The reflection string. */
#define PREFLECTION "*unsafe.Pointer"
@@ -86,7 +86,7 @@ static const String preflection_string =
};
extern const byte pointer_unsafe_Pointer_gc[]
- __asm__ (GOSYM_PREFIX "__go_td_pN14_unsafe.Pointer$gc");
+ __asm__ (GOSYM_PREFIX "type...1unsafe.Pointer..g");
const byte pointer_unsafe_Pointer_gc[] = { 1 };