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/binary.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/binary.c')
-rw-r--r-- | bfd/binary.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/bfd/binary.c b/bfd/binary.c index 1755d4a..6d68b31 100644 --- a/bfd/binary.c +++ b/bfd/binary.c @@ -149,10 +149,7 @@ mangle_name (abfd, suffix) buf = (char *) bfd_alloc (abfd, size); if (buf == NULL) - { - bfd_set_error (bfd_error_no_memory); - return false; - } + return ""; sprintf (buf, "_binary_%s_%s", bfd_get_filename (abfd), suffix); @@ -177,10 +174,7 @@ binary_get_symtab (abfd, alocation) syms = (asymbol *) bfd_alloc (abfd, BIN_SYMS * sizeof (asymbol)); if (syms == NULL) - { - bfd_set_error (bfd_error_no_memory); - return false; - } + return false; /* Start symbol. */ syms[0].the_bfd = abfd; @@ -219,12 +213,7 @@ static asymbol * binary_make_empty_symbol (abfd) bfd *abfd; { - asymbol *ret; - - ret = (asymbol *) bfd_alloc (abfd, sizeof (asymbol)); - if (ret == NULL) - bfd_set_error (bfd_error_no_memory); - return ret; + return (asymbol *) bfd_alloc (abfd, sizeof (asymbol)); } #define binary_print_symbol _bfd_nosymbols_print_symbol @@ -305,6 +294,8 @@ binary_sizeof_headers (abfd, exec) #define binary_bfd_link_add_symbols _bfd_generic_link_add_symbols #define binary_bfd_final_link _bfd_generic_final_link #define binary_bfd_link_split_section _bfd_generic_link_split_section +#define binary_get_section_contents_in_window \ + _bfd_generic_get_section_contents_in_window const bfd_target binary_vec = { |