aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-ia64.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2003-04-01 00:12:12 +0000
committerDaniel Jacobowitz <drow@false.org>2003-04-01 00:12:12 +0000
commit6e84a9068469403a0a2280e705cf3cef334afd45 (patch)
treef71a70747f666cf46df1c09d7ef131c4e6d0e1c3 /bfd/elfxx-ia64.c
parentb985b5ac74bb321d4bad1ee829dcb7e0b41a2da6 (diff)
downloadgdb-6e84a9068469403a0a2280e705cf3cef334afd45.zip
gdb-6e84a9068469403a0a2280e705cf3cef334afd45.tar.gz
gdb-6e84a9068469403a0a2280e705cf3cef334afd45.tar.bz2
* 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 c423057..3c8ec9e 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;
}