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.
This commit is contained in:
Mike Frysinger
2022-11-12 01:13:26 +07:00
parent 7dc3ab9125
commit 20fea6638f
11 changed files with 12 additions and 12 deletions

View File

@@ -198,7 +198,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);