* objfiles.c (objfile_relocate): Use gdb_bfd_count_sections instead
authorDoug Evans <dje@google.com>
Sat, 4 May 2013 06:19:31 +0000 (06:19 +0000)
committerDoug Evans <dje@google.com>
Sat, 4 May 2013 06:19:31 +0000 (06:19 +0000)
of bfd_count_sections.
* solib-target.c (solib_target_relocate_section_addresses): Ditto.
* symfile.c (default_symfile_offsets): Ditto.
(syms_from_objfile_1): Ditto.  Make dummy addrs list an array of
one entry, not bfd_count_sections entries.

gdb/ChangeLog
gdb/objfiles.c
gdb/solib-target.c
gdb/symfile.c

index a94f65955077af3bf0de46bbf3639a850e34a255..bc5ba27ac52f3bd31aaa09286ad4ca074ad5c20f 100644 (file)
@@ -1,3 +1,12 @@
+2013-05-03  Doug Evans  <dje@google.com>
+
+       * objfiles.c (objfile_relocate): Use gdb_bfd_count_sections instead
+       of bfd_count_sections.
+       * solib-target.c (solib_target_relocate_section_addresses): Ditto.
+       * symfile.c (default_symfile_offsets): Ditto.
+       (syms_from_objfile_1): Ditto.  Make dummy addrs list an array of
+       one entry, not bfd_count_sections entries.
+
 2013-05-03  Kevin Buettner  <kevinb@redhat.com>
 
        * rl78-tdep.c (rl78_register_reggroup_p): Include SP in the
index 93b7ba7b2ca529eef2ab0963de262fd6cf4855a5..2e13421301386dd05096f14027b25b2b539585b1 100644 (file)
@@ -880,7 +880,7 @@ objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets)
       addr_info_make_relative (objfile_addrs, debug_objfile->obfd);
 
       gdb_assert (debug_objfile->num_sections
-                 == bfd_count_sections (debug_objfile->obfd));
+                 == gdb_bfd_count_sections (debug_objfile->obfd));
       new_debug_offsets = 
        xmalloc (SIZEOF_N_SECTION_OFFSETS (debug_objfile->num_sections));
       make_cleanup (xfree, new_debug_offsets);
index 0ad29ba32355647bdda8abe0c25fa7e5a0a86735..483e5f9f022bc6176fb53c1c30c0fb2d23736268 100644 (file)
@@ -339,7 +339,7 @@ solib_target_relocate_section_addresses (struct so_list *so,
      it any earlier, since we need to open the file first.  */
   if (so->lm_info->offsets == NULL)
     {
-      int num_sections = bfd_count_sections (so->abfd);
+      int num_sections = gdb_bfd_count_sections (so->abfd);
 
       so->lm_info->offsets = xzalloc (SIZEOF_N_SECTION_OFFSETS (num_sections));
 
index 3e66bd101c9cbcca2d3ab182a4e828d450b09f4e..979a8dd0a51cc141c2141a93daa19c8cd3204ed0 100644 (file)
@@ -678,7 +678,7 @@ void
 default_symfile_offsets (struct objfile *objfile,
                         struct section_addr_info *addrs)
 {
-  objfile->num_sections = bfd_count_sections (objfile->obfd);
+  objfile->num_sections = gdb_bfd_count_sections (objfile->obfd);
   objfile->section_offsets = (struct section_offsets *)
     obstack_alloc (&objfile->objfile_obstack,
                   SIZEOF_N_SECTION_OFFSETS (objfile->num_sections));
@@ -948,7 +948,7 @@ syms_from_objfile_1 (struct objfile *objfile,
     {
       /* No symbols to load, but we still need to make sure
         that the section_offsets table is allocated.  */
-      int num_sections = bfd_count_sections (objfile->obfd);
+      int num_sections = gdb_bfd_count_sections (objfile->obfd);
       size_t size = SIZEOF_N_SECTION_OFFSETS (num_offsets);
 
       objfile->num_sections = num_sections;
@@ -967,8 +967,7 @@ syms_from_objfile_1 (struct objfile *objfile,
      no load address was specified.  */
   if (! addrs && ! offsets)
     {
-      local_addr
-       = alloc_section_addr_info (bfd_count_sections (objfile->obfd));
+      local_addr = alloc_section_addr_info (1);
       make_cleanup (xfree, local_addr);
       addrs = local_addr;
     }
This page took 0.033884 seconds and 4 git commands to generate.