diff options
author | Ian Lance Taylor <ian@airs.com> | 1995-11-29 22:05:37 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1995-11-29 22:05:37 +0000 |
commit | a9713b91a74c2cc05db65ec58573f388d2c41cc0 (patch) | |
tree | c786fa623034d37112d9290b9380d06ff0c36a5c /bfd/aout-adobe.c | |
parent | 8f2bdc203241c910f5ddd969a5ebb5f7199f7edd (diff) | |
download | gdb-a9713b91a74c2cc05db65ec58573f388d2c41cc0.zip gdb-a9713b91a74c2cc05db65ec58573f388d2c41cc0.tar.gz gdb-a9713b91a74c2cc05db65ec58573f388d2c41cc0.tar.bz2 |
* opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
obstack_alloc fails.
(bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
fails.
* libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
* Many files: don't set bfd_error_no_memory if one of the above
routines fails.
Diffstat (limited to 'bfd/aout-adobe.c')
-rw-r--r-- | bfd/aout-adobe.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/bfd/aout-adobe.c b/bfd/aout-adobe.c index 7f1049d..80b11fe 100644 --- a/bfd/aout-adobe.c +++ b/bfd/aout-adobe.c @@ -180,8 +180,9 @@ aout_adobe_callback (abfd) goto no_more_sections; default: - fprintf (stderr, "Unknown section type in a.out.adobe file: %x\n", - ext->e_type[0]); + (*_bfd_error_handler) + ("%s: Unknown section type in a.out.adobe file: %x\n", + bfd_get_filename (abfd), ext->e_type[0]); goto no_more_sections; } @@ -201,10 +202,8 @@ aout_adobe_callback (abfd) /* Fix the name, if it is a sprintf'd name. */ if (sect->name == try_again) { newname = (char *) bfd_zalloc(abfd, strlen (sect->name)); - if (newname == NULL) { - bfd_set_error (bfd_error_no_memory); + if (newname == NULL) return 0; - } strcpy (newname, sect->name); sect->name = newname; } @@ -255,10 +254,8 @@ aout_adobe_mkobject (abfd) struct bout_data_struct *rawptr; rawptr = (struct bout_data_struct *) bfd_zalloc (abfd, sizeof (struct bout_data_struct)); - if (rawptr == NULL) { - bfd_set_error (bfd_error_no_memory); + if (rawptr == NULL) return false; - } abfd->tdata.bout_data = rawptr; exec_hdr (abfd) = &rawptr->e; @@ -481,6 +478,7 @@ aout_adobe_sizeof_headers (ignore_abfd, ignore) #define aout_32_sizeof_headers aout_adobe_sizeof_headers #define aout_32_bfd_get_relocated_section_contents \ bfd_generic_get_relocated_section_contents +#define aout_32_get_section_contents_in_window _bfd_generic_get_section_contents_in_window #define aout_32_bfd_relax_section bfd_generic_relax_section #define aout_32_bfd_link_hash_table_create \ _bfd_generic_link_hash_table_create |