aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2023-11-21 13:16:35 -0500
committerStefan Hajnoczi <stefanha@redhat.com>2023-11-21 13:16:35 -0500
commitee82a339651bf08226c556ea07adeffa5a57e6ca (patch)
treec33f9b84a281f23a8bb9200b508b27182d81378e
parentea6a33e776f0a4bda94460ab0945d953fc801dd1 (diff)
parent82d70a84c8ee42ef969a9cfddc0f5b30b16165f5 (diff)
Merge tag 'pull-lu-20231121' of https://gitlab.com/rth7680/qemu into staging
linux-user: Fix loaddr computation for some elf files # -----BEGIN PGP SIGNATURE----- # # iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmVc0wUdHHJpY2hhcmQu # aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV97FQf+LHUf8Np5uiPwmu0f # SUVlfxccp1KjQE2pppQ16TReNV/GsJd1u4VvInhDZSMrwceCmi1T8q3n75Vff5h0 # mUaCsNKCBVOgmvjtQ+9gOCEtPNYTpEBZyfs6I4iX4+mpkDSMON28CDakILHRSAG/ # NwFs3I8E773dERR6tJmvBjAKr0a7QYMHHbXFkGN0QSaCo3YVuqMgZj1+5oGGUMun # 8f1HSRDvtAtKQgCmzsP9FEjpS4/T2ElppS0vvy063gD60Vkg9h8gyT/eFkQQMiHq # SKo1nvhuCd/xMW67RIdm6fyvgkiDvNBV5/ae8Zqdlk7TGDQP24/V3gWtTEHyQWu6 # QteijA== # =ryU1 # -----END PGP SIGNATURE----- # gpg: Signature made Tue 21 Nov 2023 10:55:49 EST # gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F # gpg: issuer "richard.henderson@linaro.org" # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full] # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F * tag 'pull-lu-20231121' of https://gitlab.com/rth7680/qemu: linux-user: Fix loaddr computation for some elf files Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r--linux-user/elfload.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 4cd6891d7b..cf9e74468b 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -3308,7 +3308,7 @@ static void load_elf_image(const char *image_name, const ImageSource *src,
for (i = 0; i < ehdr->e_phnum; ++i) {
struct elf_phdr *eppnt = phdr + i;
if (eppnt->p_type == PT_LOAD) {
- abi_ulong a = eppnt->p_vaddr - eppnt->p_offset;
+ abi_ulong a = eppnt->p_vaddr & TARGET_PAGE_MASK;
if (a < loaddr) {
loaddr = a;
}