new_offsets = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
for (i = 0; i < objfile->num_sections; ++i)
- ANOFFSET (new_offsets, i) = ANOFFSET (objfile->section_offsets, i);
+ new_offsets->offsets[i] = ANOFFSET (objfile->section_offsets, i);
/* The symbols in the object file are linked to the VMA of the section,
relocate them VMA relative. */
- ANOFFSET (new_offsets, SECT_OFF_TEXT (objfile)) = vp->tstart - vp->tvma;
- ANOFFSET (new_offsets, SECT_OFF_DATA (objfile)) = vp->dstart - vp->dvma;
- ANOFFSET (new_offsets, SECT_OFF_BSS (objfile)) = vp->dstart - vp->dvma;
+ new_offsets->offsets[SECT_OFF_TEXT (objfile)] = vp->tstart - vp->tvma;
+ new_offsets->offsets[SECT_OFF_DATA (objfile)] = vp->dstart - vp->dvma;
+ new_offsets->offsets[SECT_OFF_BSS (objfile)] = vp->dstart - vp->dvma;
objfile_relocate (objfile, new_offsets);
}
memset (&info, 0, sizeof info);
info.bfd_arch_info = bfd_get_arch_info (&abfd);
- gdbarch_update (info);
+ if (!gdbarch_update_p (info))
+ {
+ internal_error ("set_host_arch: failed to select architecture");
+ }
}
\f
do
{
size = load_segs * ldisize;
- ldi = (void *) xrealloc (ldi, load_segs * size);
+ ldi = (void *) xrealloc (ldi, size);
#if 0
/* According to my humble theory, AIX has some timing problems and