+2000-08-27 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
+
+ * pa64solib.c (pa64_solib_load_symbols): Don't use ANOFFSET as an
+ lvalue.
+ * xcoffread.c (xcoff_symfile_offsets): Ditto
+ * somsolib.c (som_solib_section_offsets): Ditto.
+ * somread.c (som_symfile_offsets): Ditto.
+ * rs6000-nat.c (vmap_symtab): Ditto.
+ * remote-vx.c (vx_add_symbols): Ditto.
+ * remote-os9k.c (rombug_wait): Ditto.
+
2000-08-27 Mark Kettenis <kettenis@gnu.org>
* gregset.h: Protect against multiple inclusion. Remove some
return;
}
- ANOFFSET (so->objfile->section_offsets, SECT_OFF_TEXT (so->objfile))
+ (so->objfile->section_offsets)->offsets[SECT_OFF_TEXT (so->objfile)]
= so->pa64_solib_desc.text_base;
- ANOFFSET (so->objfile->section_offsets, SECT_OFF_DATA (so->objfile))
+ (so->objfile->section_offsets)->offsets[SECT_OFF_DATA (so->objfile)]
= so->pa64_solib_desc.data_base;
/* Relocate all the sections based on where they got loaded. */
new_symfile_objfile (obj_sec->objfile, 1, 0);
offs = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
memcpy (offs, symfile_objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
- ANOFFSET (offs, SECT_OFF_DATA (symfile_objfile)) = addr;
- ANOFFSET (offs, SECT_OFF_BSS (symfile_objfile)) = addr;
+ offs->offsets[SECT_OFF_DATA (symfile_objfile)] = addr;
+ offs->offsets[SECT_OFF_BSS (symfile_objfile)] = addr;
objfile_relocate (symfile_objfile, offs);
}
bfd_map_over_sections (objfile->obfd, find_sect, &ss);
/* Both COFF and b.out frontends use these SECT_OFF_* values. */
- ANOFFSET (offs, SECT_OFF_TEXT (objfile)) = text_addr - ss.text_start;
- ANOFFSET (offs, SECT_OFF_DATA (objfile)) = data_addr - ss.data_start;
- ANOFFSET (offs, SECT_OFF_BSS (objfile)) = bss_addr - ss.bss_start;
+ offs->offsets[SECT_OFF_TEXT (objfile)] = text_addr - ss.text_start;
+ offs->offsets[SECT_OFF_DATA (objfile)] = data_addr - ss.data_start;
+ offs->offsets[SECT_OFF_BSS (objfile)] = bss_addr - ss.bss_start;
objfile_relocate (objfile, offs);
}
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);
}
text_addr = addrs->other[i].addr;
for (i = 0; i < SECT_OFF_MAX; i++)
- ANOFFSET (objfile->section_offsets, i) = text_addr;
+ (objfile->section_offsets)->offsets[i] = text_addr;
}
}
asection *private_section;
/* The text offset is easy. */
- ANOFFSET (offsets, SECT_OFF_TEXT (objfile))
+ offsets->offsets[SECT_OFF_TEXT (objfile)]
= (so_list->som_solib.text_addr
- so_list->som_solib.text_link_addr);
- ANOFFSET (offsets, SECT_OFF_RODATA (objfile))
+ offsets->offsets[SECT_OFF_RODATA (objfile)]
= ANOFFSET (offsets, SECT_OFF_TEXT (objfile));
/* We should look at presumed_dp in the SOM header, but
if (!private_section)
{
warning ("Unable to find $PRIVATE$ in shared library!");
- ANOFFSET (offsets, SECT_OFF_DATA (objfile)) = 0;
- ANOFFSET (offsets, SECT_OFF_BSS (objfile)) = 0;
+ offsets->offsets[SECT_OFF_DATA (objfile)] = 0;
+ offsets->offsets[SECT_OFF_BSS (objfile)] = 0;
return 1;
}
- ANOFFSET (offsets, SECT_OFF_DATA (objfile))
+ offsets->offsets[SECT_OFF_DATA (objfile)]
= (so_list->som_solib.data_start - private_section->vma);
- ANOFFSET (offsets, SECT_OFF_BSS (objfile))
+ offsets->offsets[SECT_OFF_BSS (objfile)]
= ANOFFSET (offsets, SECT_OFF_DATA (objfile));
return 1;
}
sensibly), so just ignore the addr parameter and use 0.
rs6000-nat.c will set the correct section offsets via
objfile_relocate. */
- ANOFFSET (objfile->section_offsets, i) = 0;
+ (objfile->section_offsets)->offsets[i] = 0;
}
}