17.07.2023 22:58, Helge Deller wrote:
This patch seems to work. Tested with qemu-arm and qemu-amd64.
Wow!
diff --git a/linux-user/elfload.c b/linux-user/elfload.c index a26200d9f3..b583018591 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -3615,6 +3631,13 @@ int load_elf_binary(struct linux_binprm *bprm, struct image_info *info) if (elf_interpreter) { load_elf_interp(elf_interpreter, &interp_info, bprm->buf); + /* + * adjust brk address if the interpreter was loaded above the main + * executable, e.g. happens with static binaries on armhf
Guess you mean dynamic binaries? the klibc binaries we used are dynamic, no?
+ */ + if (interp_info.brk > info->brk) { + info->brk = interp_info.brk; + }
Heh. So it clashes with brk. Nice... ;) You should ping upstream about this one before 8.1 is out, I think. /mjt