* libffi-3.1 on iOS
@ 2014-05-27 16:43 Ed VanVliet
2014-06-12 10:56 ` Anthony Green
0 siblings, 1 reply; 3+ messages in thread
From: Ed VanVliet @ 2014-05-27 16:43 UTC (permalink / raw)
To: libffi-discuss
Dear libffi crew,
Bug report:
I just tried libffi-3.1 and it produced the issues below.
Can the warnings be eliminated and the link error fixed?
Sincerely,
Ed
---------------------------
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)
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.
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: libffi-3.1 on iOS
2014-05-27 16:43 libffi-3.1 on iOS Ed VanVliet
@ 2014-06-12 10:56 ` Anthony Green
2014-06-12 20:54 ` Ed VanVliet
0 siblings, 1 reply; 3+ messages in thread
From: Anthony Green @ 2014-06-12 10:56 UTC (permalink / raw)
To: Ed VanVliet; +Cc: libffi-discuss
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: libffi-3.1 on iOS
2014-06-12 10:56 ` Anthony Green
@ 2014-06-12 20:54 ` Ed VanVliet
0 siblings, 0 replies; 3+ messages in thread
From: Ed VanVliet @ 2014-06-12 20:54 UTC (permalink / raw)
To: Anthony Green; +Cc: libffi-discuss
Dear AG,
On Jun 12, 2014, at 6:56 AM, Anthony Green <green@moxielogic.com> wrote:
> 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?
The problem is in the 32 bit simulator, not the 64 bit simulator; and only when the .a archived is linked into a (nonrelocatable) application binary. Putting that into simulator64_platform makes no difference (it works both ways). Taking it out of simulator_platform does not solve the problem.
>> 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?
__APPLE__ is defined during compilation of sysv_arm64.S
Sincerely,
Ed
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-12 20:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-27 16:43 libffi-3.1 on iOS Ed VanVliet
2014-06-12 10:56 ` Anthony Green
2014-06-12 20:54 ` Ed VanVliet
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).