OSDN Git Service

linux-user: Use zero_bss for PT_LOAD with no file contents too
authorRichard Henderson <richard.henderson@linaro.org>
Thu, 3 Aug 2023 20:52:44 +0000 (20:52 +0000)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 8 Aug 2023 20:27:17 +0000 (13:27 -0700)
commit5f4e5b34092556ab1577e25d1262bd5975b26980
tree4daadf1c05227a5ce87800cf7ef75860bc1aa954
parent2d385be6152222b61540639d2c41cdc48efec22c
linux-user: Use zero_bss for PT_LOAD with no file contents too

If p_filesz == 0, then vaddr_ef == vaddr.  We can reuse the
code in zero_bss rather than incompletely duplicating it in
load_elf_image.

Tested-by: Helge Deller <deller@gmx.de>
Reviewed-by: Helge Deller <deller@gmx.de>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
linux-user/elfload.c