On Sun, Oct 7, 2012 at 7:20 PM, Richard Henderson wrote:
> On 10/07/2012 09:34 AM, Blue Swirl wrote:
>>> > +#ifdef USE_MMAP
>>> > +code_gen_buffer = mmap((void *)start, code_gen_buffer_size,
>>> > + PROT_WRITE | PROT_READ | PROT_EXEC,
>>> > +
On 10/07/2012 09:34 AM, Blue Swirl wrote:
>> > +#ifdef USE_MMAP
>> > +code_gen_buffer = mmap((void *)start, code_gen_buffer_size,
>> > + PROT_WRITE | PROT_READ | PROT_EXEC,
>> > + flags, -1, 0);
>> > +if (code_gen_buffer == MAP_FAILED) {
>
On Thu, Oct 4, 2012 at 9:31 PM, Richard Henderson wrote:
> The hard-coded addresses inside code_gen_alloc only make sense if
> we're building an executable that will actually run at the address
> we've put into the linker scripts.
>
> When we're building with -fpie, the executable will run at some
The hard-coded addresses inside code_gen_alloc only make sense if
we're building an executable that will actually run at the address
we've put into the linker scripts.
When we're building with -fpie, the executable will run at some
random location chosen by the kernel. We get better placement for