summaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2013-05-04 06:19:31 +0000
committerDoug Evans <dje@google.com>2013-05-04 06:19:31 +0000
commit3efe260e9d1d0ce992494820b3a6d180a998917e (patch)
tree84b9d1d82509c8c539bebf0ef0ddf9a559b4789b /gdb/symfile.c
parent029d1bad2ac0ff638ecab4b1bb8f737bdb44b417 (diff)
downloadgdb-3efe260e9d1d0ce992494820b3a6d180a998917e.tar.gz
* 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.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 3e66bd101c9..979a8dd0a51 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -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;
}