aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2007-10-15 02:00:11 +0000
committerAlan Modra <amodra@gmail.com>2007-10-15 02:00:11 +0000
commitb1657152098cd6a327e6d308bae00573b8c33daf (patch)
tree47c0962ef821ea8b44ac58f91776b9deaa79c7d3 /bfd/elf32-arm.c
parent919bea4130fa41aa5fa5580fe361e1c88a6fdf2e (diff)
downloadgdb-b1657152098cd6a327e6d308bae00573b8c33daf.zip
gdb-b1657152098cd6a327e6d308bae00573b8c33daf.tar.gz
gdb-b1657152098cd6a327e6d308bae00573b8c33daf.tar.bz2
* coff-arm.c (arm_emit_base_file_entry): Check fwrite return value.
Return status. Adjust callers. * coff-mcore.c (mcore_emit_base_file_entry): Likewise. * coff-ppc.c (write_base_file_entry): New function. (coff_ppc_relocate_section): Use it. * elf32-arm.c (find_thumb_glue): Check asprintf return status. (find_arm_glue): Likewise. * vms-misc.c (_bfd_vms_output_flush): Check fwrite return value.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r--bfd/elf32-arm.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 5b536f8..cbde697 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -2520,9 +2520,10 @@ find_thumb_glue (struct bfd_link_info *link_info,
hash = elf_link_hash_lookup
(&(hash_table)->root, tmp_name, FALSE, FALSE, TRUE);
- if (hash == NULL)
- asprintf (error_message, _("unable to find THUMB glue '%s' for '%s'"),
- tmp_name, name);
+ if (hash == NULL
+ && asprintf (error_message, _("unable to find THUMB glue '%s' for '%s'"),
+ tmp_name, name) == -1)
+ *error_message = (char *) bfd_errmsg (bfd_error_system_call);
free (tmp_name);
@@ -2553,9 +2554,10 @@ find_arm_glue (struct bfd_link_info *link_info,
myh = elf_link_hash_lookup
(&(hash_table)->root, tmp_name, FALSE, FALSE, TRUE);
- if (myh == NULL)
- asprintf (error_message, _("unable to find ARM glue '%s' for '%s'"),
- tmp_name, name);
+ if (myh == NULL
+ && asprintf (error_message, _("unable to find ARM glue '%s' for '%s'"),
+ tmp_name, name) == -1)
+ *error_message = (char *) bfd_errmsg (bfd_error_system_call);
free (tmp_name);