This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question about libffi closure
>>>>> Andreas Jaeger writes:
Andreas> Should we do instead of:
Andreas> static ffi_closure cl;
Andreas> ffi_closure *pcl =3D &cl;
Andreas> use:
Andreas> ffi_closure *pcl;
Andreas> pcl = mmap (NULL, sizeof(ffi_closure), PROT_READ|PROT_EXEC,
Andreas> MAP_PRIVATE|MAP_ANONYMOUS, fd, 0);
Andreas> Ok, I'll try to change the testsuite...
And the above is more portable because...? libffi is used by more
than just GNU/Linux.
Also, this area has caused problems on systems when GCC tried to
optimize through the pointer, so you need to test on a large variety of
systems before this can be changed.
David