diff options
author | Tom Tromey <tom@tromey.com> | 2023-04-10 10:50:09 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-05-07 12:44:17 -0600 |
commit | 9ed8433a04bf0430e2da3cd44c18667859782410 (patch) | |
tree | 035e5240911b21168ddd485946571aa7cd51a5d5 /gdb/objfiles.c | |
parent | 372b4a048a2719c746bbb70bdbed257df405a4dc (diff) | |
download | binutils-9ed8433a04bf0430e2da3cd44c18667859782410.zip binutils-9ed8433a04bf0430e2da3cd44c18667859782410.tar.gz binutils-9ed8433a04bf0430e2da3cd44c18667859782410.tar.bz2 |
Rename objfile::sections
I think objfile::sections makes sense as the name of the method to
iterate over an objfile's sections, so this patch renames the existing
field to objfile::sections_start in preparation for that.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r-- | gdb/objfiles.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 9caebfe..e3fa691 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -264,7 +264,7 @@ add_to_objfile_sections (struct bfd *abfd, struct bfd_section *asect, return; } - section = &objfile->sections[gdb_bfd_section_index (abfd, asect)]; + section = &objfile->sections_start[gdb_bfd_section_index (abfd, asect)]; section->objfile = objfile; section->the_bfd_section = asect; section->ovly_mapped = 0; @@ -280,10 +280,10 @@ build_objfile_section_table (struct objfile *objfile) { int count = gdb_bfd_count_sections (objfile->obfd.get ()); - objfile->sections = OBSTACK_CALLOC (&objfile->objfile_obstack, - count, - struct obj_section); - objfile->sections_end = (objfile->sections + count); + objfile->sections_start = OBSTACK_CALLOC (&objfile->objfile_obstack, + count, + struct obj_section); + objfile->sections_end = (objfile->sections_start + count); for (asection *sect : gdb_bfd_sections (objfile->obfd)) add_to_objfile_sections (objfile->obfd.get (), sect, objfile, 0); @@ -660,7 +660,7 @@ objfile_relocate1 (struct objfile *objfile, struct obj_section *s; ALL_OBJFILE_OSECTIONS (objfile, s) { - int idx = s - objfile->sections; + int idx = s - objfile->sections_start; exec_set_section_address (bfd_get_filename (objfile->obfd.get ()), idx, s->addr ()); |