+2020-09-19 Tom Tromey <tom@tromey.com>
+
+ * elfread.c (elf_locate_sections): Change parameters.
+ (elf_symfile_read): Use foreach.
+
2020-09-19 Tom Tromey <tom@tromey.com>
* cli/cli-dump.c (struct callback_data): Remove.
-kingdon). */
static void
-elf_locate_sections (bfd *ignore_abfd, asection *sectp, void *eip)
+elf_locate_sections (asection *sectp, struct elfinfo *ei)
{
- struct elfinfo *ei;
-
- ei = (struct elfinfo *) eip;
if (strcmp (sectp->name, ".stab") == 0)
{
ei->stabsect = sectp;
memset ((char *) &ei, 0, sizeof (ei));
if (!(objfile->flags & OBJF_READNEVER))
- bfd_map_over_sections (abfd, elf_locate_sections, (void *) & ei);
+ {
+ for (asection *sect : gdb_bfd_sections (abfd))
+ elf_locate_sections (sect, &ei);
+ }
elf_read_minimal_symbols (objfile, symfile_flags, &ei);