OSDN Git Service

linux-user: Fix loaddr computation for some elf files
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 14 Nov 2023 20:13:29 +0000 (12:13 -0800)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 21 Nov 2023 15:23:27 +0000 (09:23 -0600)
commit82d70a84c8ee42ef969a9cfddc0f5b30b16165f5
treeb4e6293c73b74f015cf85188caa43319f2366260
parentc14ae763d548842c6abd1afaf5dc7ce7322ed901
linux-user: Fix loaddr computation for some elf files

The file offset of the load segment is not relevant to the
low address, only the beginning of the virtual address page.

Cc: qemu-stable@nongnu.org
Fixes: a93934fecd4 ("elf: take phdr offset into account when calculating the program load address")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1952
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
linux-user/elfload.c