aboutsummaryrefslogtreecommitdiff
path: root/ld/ldcref.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-09-11 15:27:38 +0000
committerNick Clifton <nickc@redhat.com>2009-09-11 15:27:38 +0000
commit1e9cc1c27b927dc95dfaec390eb492d29bbc7a0b (patch)
tree53a3c5ddeb73ec0cf10bb3c6e02d1a4b35a727a7 /ld/ldcref.c
parente23bb3fc8406336ae8bbfe860ef06d4685ba96eb (diff)
downloadgdb-1e9cc1c27b927dc95dfaec390eb492d29bbc7a0b.zip
gdb-1e9cc1c27b927dc95dfaec390eb492d29bbc7a0b.tar.gz
gdb-1e9cc1c27b927dc95dfaec390eb492d29bbc7a0b.tar.bz2
* po/bfd.pot: Updated by the Translation project.
* po/binutils.pot: Updated by the Translation project. * po/gold.pot: Updated by the Translation project. * po/gold.pot: Updated by the Translation project. * po/gprof.pot: Updated by the Translation project. * po/sv.po: Updated Swedish translation. * po/ld.pot: Updated by the Translation project. * po/fi.po: Updated Finnish translation. * po/ld.pot: Updated by the Translation project. * po/fi.po: Updated Finnish translation. Updated sources to compile cleanly with -Wc++-compat: * basic_blocks.c: Add casts. * cg_dfn.c: Add cast. * corefile.c: Add casts. * gmon_io.c: Add casts. * hist.c: Add cast. * source.c: Add cast. * sym_ids.c (struct match): Moved to top level. Updated soruces in ld/* to compile cleanly with -Wc++-compat: * ld.h (enum endian_enum,enum symbolic_enum,enum dynamic_list_enum): Move to top level. * ldcref.c: Add casts. * ldctor.c: Add casts. * ldexp.c * ldexp.h (enum node_tree_enum,enum phase_enum): Move to top level. * ldlang.c: Add casts. (lang_insert_orphan): Use enum name instead of integer. * ldlang.h (enum statement_enum): Move to top level. * ldmain.c: Add casts. * ldwrite.c: Add casts. * lexsup.c: Add casts. (enum control_enum): Move to top level. * mri.c: Add casts. (mri_draw_tree): Use enum name instead of integer. Updated sources to compile cleanly with -Wc++-compat: * basic_blocks.c: Add casts. * cg_dfn.c: Add cast. * corefile.c: Add casts. * gmon_io.c: Add casts. * hist.c: Add cast. * source.c: Add cast. * sym_ids.c (struct match): Moved to top level. * as.c (main): Call dwarf2_init. * config/obj-elf.c (struct group_list): New field. (build_group_lists): Use hash lookup. (free_section_idx): New function. (elf_frob_file): Adjust. * dwarf2dbg.c (all_segs_hash, last_seg_ptr): New variables. (get_line_subseg): Adjust. (dwarf2_init): New function. * dwarf2dbg.h (dwarf2_init): New declaration.
Diffstat (limited to 'ld/ldcref.c')
-rw-r--r--ld/ldcref.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/ld/ldcref.c b/ld/ldcref.c
index 479cac9..c329d7d 100644
--- a/ld/ldcref.c
+++ b/ld/ldcref.c
@@ -179,7 +179,7 @@ add_cref (const char *name,
if (r == NULL)
{
- r = bfd_hash_allocate (&cref_table.root, sizeof *r);
+ r = (struct cref_ref *) bfd_hash_allocate (&cref_table.root, sizeof *r);
if (r == NULL)
einfo (_("%X%P: cref alloc failed: %E\n"));
r->next = h->refs;
@@ -324,7 +324,7 @@ handle_asneeded_cref (bfd *abfd ATTRIBUTE_UNUSED,
static bfd_boolean
cref_fill_array (struct cref_hash_entry *h, void *data)
{
- struct cref_hash_entry ***pph = data;
+ struct cref_hash_entry ***pph = (struct cref_hash_entry ***) data;
ASSERT (h->demangled == NULL);
h->demangled = bfd_demangle (link_info.output_bfd, h->root.string,
@@ -344,8 +344,10 @@ cref_fill_array (struct cref_hash_entry *h, void *data)
static int
cref_sort_array (const void *a1, const void *a2)
{
- const struct cref_hash_entry * const *p1 = a1;
- const struct cref_hash_entry * const *p2 = a2;
+ const struct cref_hash_entry * const *p1 =
+ (const struct cref_hash_entry * const *) a1;
+ const struct cref_hash_entry * const *p2 =
+ (const struct cref_hash_entry * const *) a2;
return strcmp ((*p1)->demangled, (*p2)->demangled);
}
@@ -378,7 +380,7 @@ output_cref (FILE *fp)
return;
}
- csyms = xmalloc (cref_symcount * sizeof (*csyms));
+ csyms = (struct cref_hash_entry **) xmalloc (cref_symcount * sizeof (*csyms));
csym_fill = csyms;
cref_hash_traverse (&cref_table, cref_fill_array, &csym_fill);
@@ -602,7 +604,7 @@ check_refs (const char *name,
static void
check_reloc_refs (bfd *abfd, asection *sec, void *iarg)
{
- struct check_refs_info *info = iarg;
+ struct check_refs_info *info = (struct check_refs_info *) iarg;
asection *outsec;
const char *outsecname;
asection *outdefsec;
@@ -649,7 +651,7 @@ check_reloc_refs (bfd *abfd, asection *sec, void *iarg)
if (relsize == 0)
return;
- relpp = xmalloc (relsize);
+ relpp = (arelent **) xmalloc (relsize);
relcount = bfd_canonicalize_reloc (abfd, sec, relpp, info->asymbols);
if (relcount < 0)
einfo (_("%B%F: could not read relocs: %E\n"), abfd);