]> git.proxmox.com Git - mirror_qemu.git/commit
linux-user: Fix qemu-arm to run static armhf binaries
authorHelge Deller <deller@gmx.de>
Mon, 17 Jul 2023 20:06:02 +0000 (22:06 +0200)
committerHelge Deller <deller@gmx.de>
Tue, 18 Jul 2023 18:42:05 +0000 (20:42 +0200)
commit518f32221af759a29500ac172c4c857bef142067
tree2f027ebea1fd43e3edb25fa23791caf256ad17ad
parentd971040c2d16b7fda9fcd52c993262b437501538
linux-user: Fix qemu-arm to run static armhf binaries

qemu-user crashes immediately when running static binaries on the armhf
architecture. The problem is the memory layout where the executable is
loaded before the interpreter library, in which case the reserved brk
region clashes with the interpreter code and is released before qemu
tries to start the program.

At load time qemu calculates a brk value for interpreter and executable
each.  The fix is to choose the higher one of both.

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: Andreas Schwab <schwab@suse.de>
Cc: qemu-stable@nongnu.org
Reported-by: Venkata.Pyla@toshiba-tsip.com
Closes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040981
linux-user/elfload.c