From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29716 invoked by alias); 11 Dec 2014 09:21:53 -0000 Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org Received: (qmail 29691 invoked by uid 89); 11 Dec 2014 09:21:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f53.google.com Received: from mail-pa0-f53.google.com (HELO mail-pa0-f53.google.com) (209.85.220.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 11 Dec 2014 09:21:51 +0000 Received: by mail-pa0-f53.google.com with SMTP id kq14so4702280pab.40 for ; Thu, 11 Dec 2014 01:21:50 -0800 (PST) X-Received: by 10.70.47.6 with SMTP id z6mr15422765pdm.82.1418289710189; Thu, 11 Dec 2014 01:21:50 -0800 (PST) Received: from bubble.grove.modra.org (CPE-58-160-155-134.oycza5.sa.bigpond.net.au. [58.160.155.134]) by mx.google.com with ESMTPSA id vl1sm770504pbc.62.2014.12.11.01.21.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Dec 2014 01:21:49 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 23FD1EA4722; Thu, 11 Dec 2014 19:51:44 +1030 (ACDT) Date: Thu, 11 Dec 2014 09:21:00 -0000 From: Alan Modra To: libffi-discuss@sourceware.org, gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com, Andreas Krebbel Subject: Re: [PATCH 00/13] Go closures, libffi, and the static chain Message-ID: <20141211092144.GE4283@bubble.grove.modra.org> Mail-Followup-To: libffi-discuss@sourceware.org, gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com, Andreas Krebbel References: <1412973773-3942-1-git-send-email-rth@redhat.com> <20141211090623.GA30484@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141211090623.GA30484@linux.vnet.ibm.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2014/txt/msg00253.txt.bz2 On Thu, Dec 11, 2014 at 10:06:23AM +0100, Dominik Vogt wrote: > On s390x, the static chain register cannot be used for passing the > Go closure pointer to a function: According to the Abi, the > dynamic linker is allowed to destroy the contents of r0 (static > chain register) eventually causing a crash if libgo is linked > dynamically. The assumption that the static chain register can be > used to pass information to a function is wrong for s390x. I was worried about exactly the same "problem" on powerpc with r11 being used for the static chain and also destroyed in linkage stubs. It turns out we don't traverse any linkage stubs. See https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00446.html. -- Alan Modra Australia Development Lab, IBM