From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2802 invoked by alias); 11 Dec 2014 19:56:12 -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 2702 invoked by uid 89); 11 Dec 2014 19:56:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 11 Dec 2014 19:56:10 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBBJu2Jt029348 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 11 Dec 2014 14:56:02 -0500 Received: from anchor.twiddle.net (vpn-224-205.phx2.redhat.com [10.3.224.205]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBBJu1X5002347; Thu, 11 Dec 2014 14:56:01 -0500 Message-ID: <5489F6D0.8020009@redhat.com> Date: Thu, 11 Dec 2014 19:56:00 -0000 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: libffi-discuss@sourceware.org, gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com CC: Andreas Krebbel , Alan Modra Subject: Re: [gofrontend-dev] Re: [PATCH 00/13] Go closures, libffi, and the static chain References: <1412973773-3942-1-git-send-email-rth@redhat.com> <20141211090623.GA30484@linux.vnet.ibm.com> <20141211092144.GE4283@bubble.grove.modra.org> <20141211103106.GA9789@linux.vnet.ibm.com> <20141211122519.GA26215@linux.vnet.ibm.com> In-Reply-To: <20141211122519.GA26215@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2014/txt/msg00257.txt.bz2 On 12/11/2014 04:25 AM, Dominik Vogt wrote: > Update: If I disable the custom s390x code and switch to the > implementation just using libffi for reflection calls, the same > crash occurs with the testing/quick libgo test case. The called > function sees a bogus value written by the synamic linker as the > closure pointer, for example with this line in the test code: > > CheckEqual(fComplex64, fComplex64, nil) The compiler should be generating a static structure for these. On x86_64, I see Relocation section '.rela.rodata.testing_quick.fComplex64$descriptor' at offset 0x5d4c0 contains 1 entries: Offset Info Type Sym. Value Sym. Name + Addend 000000000000 000200000001 R_X86_64_64 0000000000000000 .text + c0 00000000000000c0 t quick.fComplex64 so that is in fact a direct relocation, and will not go via the dynamic linker. Is the s390 port somehow putting the address of a plt entry here? r~