summaryrefslogtreecommitdiff
path: root/sim/pru
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-11-12 01:13:26 +0700
committerMike Frysinger <vapier@gentoo.org>2022-12-22 19:29:10 -0500
commit20fea6638f1785b241c39454dcb707234a675524 (patch)
tree9a192d2692268726fb466753904ed6eea4443855 /sim/pru
parent7dc3ab91259b96e87f7dbc423b9d5aeaf4e447ed (diff)
downloadbinutils-gdb-20fea6638f1785b241c39454dcb707234a675524.tar.gz
sim: use bfd_vma when reading start addr from bfd info
Since SIM_ADDR is always 32-bit, it might truncate the address with 64-bit ELFs. Since we load that addr from the bfd, use the bfd_vma type which matches the bfd_get_start_address API.
Diffstat (limited to 'sim/pru')
-rw-r--r--sim/pru/interp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sim/pru/interp.c b/sim/pru/interp.c
index c7226a349b6..250a32a889a 100644
--- a/sim/pru/interp.c
+++ b/sim/pru/interp.c
@@ -856,7 +856,7 @@ sim_create_inferior (SIM_DESC sd, struct bfd *prog_bfd,
SIM_CPU *cpu = STATE_CPU (sd, 0);
struct pru_regset *pru_cpu = PRU_SIM_CPU (cpu);
host_callback *cb = STATE_CALLBACK (sd);
- SIM_ADDR addr;
+ bfd_vma addr;
addr = bfd_get_start_address (prog_bfd);