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/iq2000/sim-if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sim/iq2000') diff --git a/sim/iq2000/sim-if.c b/sim/iq2000/sim-if.c index 1b1b3ac..e9b66b6 100644 --- a/sim/iq2000/sim-if.c +++ b/sim/iq2000/sim-if.c @@ -137,7 +137,7 @@ sim_create_inferior (SIM_DESC sd, struct bfd *abfd, char * const *argv, { SIM_CPU *current_cpu = STATE_CPU (sd, 0); host_callback *cb = STATE_CALLBACK (sd); - SIM_ADDR addr; + bfd_vma addr; if (abfd != NULL) addr = bfd_get_start_address (abfd); -- cgit v1.1