From 20fea6638f1785b241c39454dcb707234a675524 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 12 Nov 2022 01:13:26 +0700 Subject: 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. --- sim/cris/sim-if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sim/cris') diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c index 7568b85..a952a27 100644 --- a/sim/cris/sim-if.c +++ b/sim/cris/sim-if.c @@ -974,10 +974,10 @@ sim_create_inferior (SIM_DESC sd, struct bfd *abfd, { SIM_CPU *current_cpu = STATE_CPU (sd, 0); host_callback *cb = STATE_CALLBACK (sd); - SIM_ADDR addr; + bfd_vma addr; if (sd != NULL) - addr = cris_start_address != (SIM_ADDR) -1 + addr = cris_start_address != (USI) -1 ? cris_start_address : (interp_start_addr != 0 ? interp_start_addr -- cgit v1.1