linux-user: Correctly start brk after executable
commit8a0451886824fb266fbdcd1ca01d6acb023e3e09
authorTimothy E Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
Tue, 28 Jul 2020 22:46:15 +0000 (28 23:46 +0100)
committerLaurent Vivier <laurent@vivier.eu>
Sat, 5 Sep 2020 20:51:07 +0000 (5 22:51 +0200)
tree0e81e0ca54c6c11266da2053769a63d0038df83a
parente5ce9688b47a8f60337ce1e4108f35577494a46a
linux-user: Correctly start brk after executable

info->brk was erroneously set to the end of highest addressed
writable segment which could result it in overlapping the executable.

As per load_elf_binary in fs/binfmt_elf.c in Linux, it should be
set to end of highest addressed segment.

Signed-off-by: Timothy E Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200728224615.326675-1-T.E.Baldwin99@members.leeds.ac.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/elfload.c