From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19768 invoked by alias); 12 Jun 2014 10:56:17 -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 19751 invoked by uid 89); 12 Jun 2014 10:56:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-qc0-f179.google.com Received: from mail-qc0-f179.google.com (HELO mail-qc0-f179.google.com) (209.85.216.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 12 Jun 2014 10:56:14 +0000 Received: by mail-qc0-f179.google.com with SMTP id x3so408618qcv.10 for ; Thu, 12 Jun 2014 03:56:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=1Uy1uYYpb8ZMfF89iwLFZDvo054olvxCdhMPqtlunzo=; b=j8iEp6Khf9RZKhAUctAw43G1y+/SJM5w3TlQy+IUlDf8QB2xPvYXCHNCT4z91PK8/y Cc34K03pjXjtltRykl+VuhfTpFEqHRjgYLNxXJBJV2hFxQ+vfPaEYhmIhHemufWmnFwZ 9GDPIK8rclQgsjgwGE6JPPDmCG7PoaTSVccLZoHJkWwMYOIjfxuFFDHDHwsYQhW1r+Pf iXctQSz+qX2OndJm9iUZEg8i0r//pfEOLpSWgEHYDDJp1k7got1eZ8Z/cjLl2U3mb6tP Tws45Ae3SweACnw0ghKhqaJVUxtp3UQfC/ebBU/dg1HONMF/pSs0wpxMLrh/qc1TVIfj ZjPQ== X-Gm-Message-State: ALoCoQk8D0CgBmmNAlm+VNkVDAiz+Zq10ey08z6OZ+l4h6pqm7DMXv+R9sFcaP1reBULUBwYtI1q X-Received: by 10.224.160.202 with SMTP id o10mr60458674qax.8.1402570572127; Thu, 12 Jun 2014 03:56:12 -0700 (PDT) Received: from localhost (dsl-173-206-70-109.tor.primus.ca. [173.206.70.109]) by mx.google.com with ESMTPSA id k5sm924898qad.45.2014.06.12.03.56.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jun 2014 03:56:10 -0700 (PDT) From: Anthony Green To: Ed VanVliet Cc: libffi-discuss@sourceware.org Subject: Re: libffi-3.1 on iOS References: <78ECC115-FDDC-493D-8E2B-00745978E522@vvi.com> Date: Thu, 12 Jun 2014 10:56:00 -0000 In-Reply-To: <78ECC115-FDDC-493D-8E2B-00745978E522@vvi.com> (Ed VanVliet's message of "Tue, 27 May 2014 12:43:45 -0400") Message-ID: <87tx7qz99y.fsf@moxielogic.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2014/txt/msg00067.txt.bz2 Ed VanVliet writes: > Running libffi on iOS (iPhone) simulator works for both 32 and 64 bit simulators using libffi-3.0.14-rc0 > > But, with libffi-3.1 it works for 64 bit simulator, but fails to link for 32 bit simulator; giving the following: > > (null): "_ffi_call_win32", referenced from: > (null): "_ffi_closure_FASTCALL", referenced from: > (null): "_ffi_closure_STDCALL", referenced from: > (null): "_ffi_closure_THISCALL", referenced from: > (null): Linker command failed with exit code 1 (use -v to see > invocation) Could you please try adding win32.S to src_files for simulator64_platform in generate-darwin-source-and-headers.py and rebuilding? > Also, on both the 32 and 64 bit segments the linker gives this warning: > > (null): Could not create compact unwind for .LFB3: non-standard register 5 being saved in prolog > > which it gave for both 3.0.14-rc0 and 3.1. However, the warning does > not seem to cause a problem. Not sure about this yet. > On the ARM target the linker gives the following warnings: > > ld: warning: arm64 function not 4-byte aligned: ltmp0 from /libffi.a(sysv_arm64.o) > ld: warning: arm64 function not 4-byte aligned: _ffi_call_SYSV from /libffi.a(sysv_arm64.o) > ld: warning: arm64 function not 4-byte aligned: _ffi_closure_SYSV from /libffi.a(sysv_arm64.o) > > which also do not seem to cause a problem. > > It would be nice to fix the build and code so it didn't produce the > error and warnings. So this is weird. ffi_call_SYSV and ffi_closure_SYSV both have... #ifdef __APPLE__ .align 2 #endif ...which I believe should make things 4-byte aligned. Is __APPLE__ not defined? AG