public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Anthony Green <green@moxielogic.com>
To: Ed VanVliet <ed@vvi.com>
Cc: libffi-discuss@sourceware.org
Subject: Re: libffi-3.1 on iOS
Date: Thu, 12 Jun 2014 10:56:00 -0000	[thread overview]
Message-ID: <87tx7qz99y.fsf@moxielogic.com> (raw)
In-Reply-To: <78ECC115-FDDC-493D-8E2B-00745978E522@vvi.com> (Ed VanVliet's	message of "Tue, 27 May 2014 12:43:45 -0400")

Ed VanVliet <ed@vvi.com> 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


  reply	other threads:[~2014-06-12 10:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-27 16:43 Ed VanVliet
2014-06-12 10:56 ` Anthony Green [this message]
2014-06-12 20:54   ` Ed VanVliet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tx7qz99y.fsf@moxielogic.com \
    --to=green@moxielogic.com \
    --cc=ed@vvi.com \
    --cc=libffi-discuss@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).