public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com>
To: Russell Keith-Magee <russell@keith-magee.com>,
	       libffi-discuss@sourceware.org
Subject: Re: Questions about the libffi development process
Date: Tue, 21 Apr 2015 18:11:00 -0000	[thread overview]
Message-ID: <553692BE.2070306@redhat.com> (raw)
In-Reply-To: <CAJxq849SA-pRuNZpENhrJHQdtW+LVD-Pr988j0jWuNVpLTo0Zg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 834 bytes --]

On 04/17/2015 08:29 PM, Russell Keith-Magee wrote:
> I've got 2 questions about the libffi development process.
> 
> 1. A recent commit:
> 
> https://github.com/atgreen/libffi/commit/a4b785ea
> 
> (authored by Richard Henderson) appears to have broken ARMv7 support
> to the point where libffi doesn't build. (Or, at least, it raises a
> syntax error on iOS - but I can't see any reason the same problem
> wouldn't exist for other ARM platforms).

It certainly does build for armv7l-unknown-linux-gnueabihf.  But then, only iOS
defines FFI_EXEC_TRAMPOLINE_TABLE, wherein the trouble lies.

The development process relies on those having access to proprietary operating
systems fixing the problems that arise on those systems.  I don't have access
to iOS.

That said, the problem appears to be trivial.  Please try the following.


r~

[-- Attachment #2: z --]
[-- Type: text/plain, Size: 931 bytes --]

diff --git a/src/arm/ffi.c b/src/arm/ffi.c
index 9c8732d..f030a0c 100644
--- a/src/arm/ffi.c
+++ b/src/arm/ffi.c
@@ -537,7 +537,7 @@ void ffi_go_closure_VFP (void) FFI_HIDDEN;
 #include <stdio.h>
 #include <stdlib.h>
 
-extern void *ffi_closure_trampoline_table_page;
+extern int ffi_closure_trampoline_table_page[];
 
 typedef struct ffi_trampoline_table ffi_trampoline_table;
 typedef struct ffi_trampoline_table_entry ffi_trampoline_table_entry;
diff --git a/src/arm/sysv.S b/src/arm/sysv.S
index fd16589..6b3ad21 100644
--- a/src/arm/sysv.S
+++ b/src/arm/sysv.S
@@ -313,12 +313,13 @@ ARM_FUNC_END(ffi_closure_ret)
    keep all the magic numbers the same within ffi.c.  */
 
 	.align	12
-ARM_FUNC_START(ffi_closure_trampoline_table_page)
+ARM_FUNC_START(ffi_closure_trampoline_table_page, 1)
 .rept	4096 / 12
 	nop
 	ldr	ip, [pc, #-4092]
 	ldr	pc, [pc, #-4092]
 .endr
+ARM_FUNC_END(ffi_closure_trampoline_table_page)
 
 #else
 

  reply	other threads:[~2015-04-21 18:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-18  6:29 Russell Keith-Magee
2015-04-21 18:11 ` Richard Henderson [this message]
2015-04-23  8:25   ` Russell Keith-Magee
2015-04-23 19:13     ` Richard Henderson
2015-04-24  1:49       ` Russell Keith-Magee
2015-04-24 16:29         ` Richard Henderson
2015-04-25 11:15           ` Russell Keith-Magee

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=553692BE.2070306@redhat.com \
    --to=rth@redhat.com \
    --cc=libffi-discuss@sourceware.org \
    --cc=russell@keith-magee.com \
    /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).