summaryrefslogtreecommitdiff
path: root/bfd/elfxx-ia64.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2003-04-01 00:12:12 +0000
committerDaniel Jacobowitz <dan@debian.org>2003-04-01 00:12:12 +0000
commit13da88a8f27c8685220e1b1e1f1b879bf5554c0a (patch)
tree2d7d9517895de66e71351c9fb0348daf24568a16 /bfd/elfxx-ia64.c
parent191c937c178301455188ef5e7c1d2cd7fee16ef0 (diff)
downloadgdb-13da88a8f27c8685220e1b1e1f1b879bf5554c0a.tar.gz
* simple.c (bfd_simple_get_relocated_section_contents): Add
parameter symbol_table. Optionally use it instead of the symbol table from the bfd. Save and restore output offsets and output sections around bfd_get_relocated_section_contents. Fix a memory leak. (simple_save_output_info, simple_restore_output_info): New functions. * bfd-in2.h: Regenerate. * dwarf2.c (read_abbrevs): Use bfd_simple_get_relocated_section_contents instead of bfd_get_section_contents. (decode_line_info): Likewise. (_bfd_dwarf2_find_nearest_line): Likewise. Don't call find_rela_addend. (find_rela_addend): Remove. * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for debugging sections. (elfNN_ia64_hash_table_create): Create the hash table with malloc, not bfd_zalloc.
Diffstat (limited to 'bfd/elfxx-ia64.c')
-rw-r--r--bfd/elfxx-ia64.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index c42305717c6..3c8ec9e45ce 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -357,6 +357,10 @@ elfNN_ia64_reloc (abfd, reloc, sym, data, input_section,
reloc->address += input_section->output_offset;
return bfd_reloc_ok;
}
+
+ if (input_section->flags & SEC_DEBUGGING)
+ return bfd_reloc_continue;
+
*error_message = "Unsupported call to elfNN_ia64_reloc";
return bfd_reloc_notsupported;
}
@@ -1788,19 +1792,24 @@ elfNN_ia64_hash_table_create (abfd)
{
struct elfNN_ia64_link_hash_table *ret;
- ret = bfd_zalloc (abfd, (bfd_size_type) sizeof (*ret));
+ ret = bfd_zmalloc ((bfd_size_type) sizeof (*ret));
if (!ret)
return 0;
+
if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
elfNN_ia64_new_elf_hash_entry))
{
- bfd_release (abfd, ret);
+ free (ret);
return 0;
}
if (!elfNN_ia64_local_hash_table_init (&ret->loc_hash_table, abfd,
elfNN_ia64_new_loc_hash_entry))
- return 0;
+ {
+ free (ret);
+ return 0;
+ }
+
return &ret->root.root;
}