]> Git Repo - qemu.git/commit - exec.c
exec: Do not use absolute address hints for code_gen_buffer with -fpie
authorRichard Henderson <[email protected]>
Tue, 16 Oct 2012 07:30:12 +0000 (17:30 +1000)
committerBlue Swirl <[email protected]>
Sat, 20 Oct 2012 07:54:04 +0000 (07:54 +0000)
commit405def18466d0cbd84e6a0edb598466b0a5e15c3
treed193dbb53cbf75cf1b5e191ba3439436049181d7
parent3d85a72fd8af6804f66a48d85187f448b14ddba3
exec: Do not use absolute address hints for code_gen_buffer with -fpie

The hard-coded addresses inside alloc_code_gen_buffer 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
the code_gen_buffer if we allow the kernel to place the memory,
as it will tend to to place it near the executable, based on the
PROT_EXEC bit.

Since code_gen_prologue is always inside the executable, this effect
is easily seen at the end of most TB, with the exit_tb opcode, and
with any calls to helper functions.

Signed-off-by: Richard Henderson <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
exec.c
This page took 0.025911 seconds and 4 git commands to generate.