From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id CF6073858011 for ; Sun, 22 Nov 2020 19:00:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CF6073858011 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=none smtp.mailfrom=ro@cebitec.uni-bielefeld.de Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 2FECC6564B; Sun, 22 Nov 2020 20:00:20 +0100 (CET) X-Virus-Scanned: amavisd-new at CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gYnntqLgQRkd; Sun, 22 Nov 2020 20:00:19 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p4fddb2f4.dip0.t-ipconnect.de [79.221.178.244]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 5CCC8653EE; Sun, 22 Nov 2020 20:00:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=CeBiTec.Uni-Bielefeld.DE; s=20200306; t=1606071619; bh=I/zybD0wFfyoJZIetqkOCMvrq7jYVplqpgj0udhemGY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=WmlnBPGvrjFqtzYb9VnNMrkzdg3NraTZi6tgJOmwaFOEv/0pm/utMQLcZX4yWFjZy rZK13J+8o3Sff/yb9lWs4QHhbYGH2hVRZgzVqUvvu9qAdpp7VbYJRj3MNZ6zRikpZG 2lVInwtP/JuwHlDyex5eFRQQuMxd0jbcTihp4G47elV/ZI4ym82/7tUime6wxd7gcM z/txXPmaNyqe3D/oQss7BCEqrd5tk0Z/HWkNAy1gB1o8oMW889cOT4DjNF8RV+wz6K mJxxbiDPYP/Glda5QOFbmBKdv/LuSBOEH0FH/LoFmkIUA03UEMkeUINYw3c1Zyd9dW SJuBSkWsvm0ww== From: Rainer Orth To: Ian Lance Taylor via Gcc-patches Cc: gofrontend-dev , Ian Lance Taylor Subject: Re: Go patch committed: Change name mangling convention References: Date: Sun, 22 Nov 2020 20:00:18 +0100 In-Reply-To: (Ian Lance Taylor via Gcc-patches's message of "Fri, 20 Nov 2020 12:44:44 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (usg-unix-v) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Status: No, score=-3796.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, KAM_STOCKGEN, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Nov 2020 19:00:23 -0000 --=-=-= Content-Type: text/plain Hi Ian, > This patch to the Go frontend and libgo changes the name mangling > convention. The previous convention (which was actually the second > one) turned out to be ambiguous when the path to a package contained a > dot; this is a common case, as many package paths are of the form > "github.com/name/package". The previous convention also did not > support package paths that start with a digit, which is less common > but does occur (https://golang.org/issue/41862). > > This patch rewrites and somewhat simplifies the naming convention. > Now dot is used only as a separator character and for special names. > Actual name mangling, for representing Unicode characters and other > non-ASCII alphanumerics, is now done with an underscore. This has the > advantage of being simpler, in that it avoids the overloading that the > previous convention applied to dot. It has the disadvantage that > mangled symbol names look somewhat like valid Go names, since valid Go > names can of course contain underscore. Still, it seems like the best > choice. > > This patch increments the libgo major version number, since many > symbol names have changed. > > Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed > to mainline. this patch broke Solaris bootstrap: linking in gotools fails with Undefined first referenced symbol in file log_1syslog.syslog__c ../i386-pc-solaris2.11/libgo/.libs/libgo.so ld: fatal: symbol referencing errors collect2: error: ld returned 1 exit status make[2]: *** [Makefile:829: buildid] Error 1 The following patch fixed this for me: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=lgs.patch diff --git a/libgo/go/log/syslog/syslog_c.c b/libgo/go/log/syslog/syslog_c.c --- a/libgo/go/log/syslog/syslog_c.c +++ b/libgo/go/log/syslog/syslog_c.c @@ -12,7 +12,7 @@ can't represent a C varargs function in Go. */ void syslog_c(intgo, const char*) - __asm__ (GOSYM_PREFIX "log_1syslog.syslog_c"); + __asm__ (GOSYM_PREFIX "log_1syslog.syslog__c"); void syslog_c (intgo priority, const char *msg) --=-=-= Content-Type: text/plain Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University --=-=-=--