[llvm-commits] [llvm] r57846 - in /llvm/trunk: include/llvm/System/Memory.h lib/System/Unix/Memory.inc lib/System/Win32/Memory.inc lib/Target/ARM/ARMJITInfo.cpp
Jim Grosbach
grosbach at apple.com
Tue Oct 21 08:26:38 PDT 2008
On Oct 21, 2008, at 12:41 AM, Duncan Sands wrote:
>> Added back in range-based memory permission functions for the
>> updating of
>> the stub on Darwin.
>
> Is this really Darwin specific?
> Also, there doesn't seem to be any need for the #if defined(__APPLE__)
> in these kinds of places:
>
True. At the moment, it's Darwin specific, yes. Normally, the memory
is allocated read-write-execute and none of the twiddling about is
necessary at all.
The ifdef here isn't strictly necessary, regardless, as you point out.
Not something I feel strongly about at all. Prefer having it always
execute?
> +#if defined(__APPLE__)
> + ok = sys::Memory::setRangeExecutable ((void*)StubAddr, 8);
> + if (!ok)
> + {
> + cerr << "ERROR: Unable to mark stub executable\n";
> + abort();
> + }
> +#endif
>
> After all, the functions complete successfully on non-__APPLE__
> platforms.
>
> Ciao,
>
> Duncan.
More information about the llvm-commits
mailing list