This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question about libffi closure
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Andreas Jaeger <aj at suse dot de>
- Cc: Andrew Haley <aph at redhat dot com>, <gcc at gcc dot gnu dot org>
- Date: Wed, 19 Nov 2003 15:40:32 -0500 (EST)
- Subject: Re: Question about libffi closure
On Wed, 19 Nov 2003, Andreas Jaeger wrote:
> So, how shall we fix the testsuite?
>
> Should we do instead of:
>
> static ffi_closure cl;
> ffi_closure *pcl = &cl;
>
> use:
> ffi_closure *pcl;
>
> pcl = mmap (NULL, sizeof(ffi_closure), PROT_READ|PROT_EXEC,
> MAP_PRIVATE|MAP_ANONYMOUS, fd, 0);
mprotect might be easier, and can be preprocessed out wherever it isn't
supported.
Jeff