This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]