summaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-04-10 10:50:09 -0600
committerTom Tromey <tom@tromey.com>2023-05-07 12:44:17 -0600
commit9ed8433a04bf0430e2da3cd44c18667859782410 (patch)
tree035e5240911b21168ddd485946571aa7cd51a5d5 /gdb/objfiles.c
parent372b4a048a2719c746bbb70bdbed257df405a4dc (diff)
downloadbinutils-gdb-9ed8433a04bf0430e2da3cd44c18667859782410.tar.gz
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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 9caebfefd59..e3fa691dd53 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 ());