[GHC] #7718: ios patch no 8: adjustor pools
GHC
cvs-ghc at haskell.org
Thu Mar 28 13:55:07 CET 2013
#7718: ios patch no 8: adjustor pools
--------------------------------+-------------------------------------------
Reporter: StephenBlackheath | Owner:
Type: feature request | Status: patch
Priority: normal | Milestone:
Component: Compiler | Version: 7.7
Resolution: | Keywords:
Os: Other | Architecture: arm
Failure: None/Unknown | Difficulty: Unknown
Testcase: | Blockedby:
Blocking: 7724 | Related:
--------------------------------+-------------------------------------------
Changes (by StephenBlackheath):
* status: new => patch
Comment:
I have got libffi working on iOS now for adjustors, so we don't need the
pools any more, which is great news. My work is done now (unless you need
something fixed), and it's over to you guys.
-----------------
How libffi gets around Apple's restrictions is interesting, and I never
would have thought of it. Somehow or other it manages to allocate two
adjacent memory pages, setting the second one to be executable and putting
some pre-compiled data in it. The executable page then fetches the
closure's data with a PC-relative reference of -4096 or so (the page
size), so it picks the data out of the writable memory! Mind boggling.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7718#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list