]> git.proxmox.com Git - mirror_qemu.git/commit
linux-user: Adjust brk for load_bias
authorRichard Henderson <richard.henderson@linaro.org>
Wed, 16 Aug 2023 17:32:18 +0000 (10:32 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Fri, 1 Sep 2023 20:34:18 +0000 (13:34 -0700)
commitaec338d63bc28f1f13d5e64c561d7f1dd0e4b07e
tree0482b4bdf32065cd44ed25aa1e4a2dc102bb387f
parent7b7a3366e142d3baeb3fd1d3660a50e7956c19eb
linux-user: Adjust brk for load_bias

PIE executables are usually linked at offset 0 and are
relocated somewhere during load.  The hiaddr needs to
be adjusted to keep the brk next to the executable.

Cc: qemu-stable@nongnu.org
Fixes: 1f356e8c013 ("linux-user: Adjust initial brk when interpreter is close to executable")
Tested-by: Helge Deller <deller@gmx.de>
Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
linux-user/elfload.c