aboutsummaryrefslogtreecommitdiff
path: root/bfd/tekhex.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-11-29 22:05:37 +0000
committerIan Lance Taylor <ian@airs.com>1995-11-29 22:05:37 +0000
commita9713b91a74c2cc05db65ec58573f388d2c41cc0 (patch)
treec786fa623034d37112d9290b9380d06ff0c36a5c /bfd/tekhex.c
parent8f2bdc203241c910f5ddd969a5ebb5f7199f7edd (diff)
downloadgdb-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/tekhex.c')
-rw-r--r--bfd/tekhex.c34
1 files changed, 9 insertions, 25 deletions
diff --git a/bfd/tekhex.c b/bfd/tekhex.c
index 48d7e5c..6a5b913 100644
--- a/bfd/tekhex.c
+++ b/bfd/tekhex.c
@@ -335,10 +335,7 @@ find_chunk (abfd, vma)
bfd_alloc (abfd, sizeof (struct data_struct));
if (!sname || !d)
- {
- bfd_set_error (bfd_error_no_memory);
- return NULL;
- }
+ return NULL;
memset (d->chunk_init, 0, CHUNK_MASK + 1);
memset (d->chunk_data, 0, CHUNK_MASK + 1);
@@ -399,10 +396,7 @@ first_phase (abfd, type, src)
char *n = bfd_alloc (abfd, len + 1);
if (!n)
- {
- bfd_set_error (bfd_error_no_memory);
- abort(); /* FIXME */
- }
+ abort(); /* FIXME */
memcpy (n, sym, len + 1);
section = bfd_make_section (abfd, n);
}
@@ -431,10 +425,7 @@ first_phase (abfd, type, src)
char type = (*src);
if (!new)
- {
- bfd_set_error (bfd_error_no_memory);
- abort(); /* FIXME */
- }
+ abort(); /* FIXME */
new->symbol.the_bfd = abfd;
src++;
abfd->symcount++;
@@ -444,10 +435,7 @@ first_phase (abfd, type, src)
len = getsym (sym, &src);
new->symbol.name = bfd_alloc (abfd, len + 1);
if (!new->symbol.name)
- {
- bfd_set_error (bfd_error_no_memory);
- abort(); /* FIXME */
- }
+ abort(); /* FIXME */
memcpy ((char *) (new->symbol.name), sym, len + 1);
new->symbol.section = section;
if (type <= '4')
@@ -545,10 +533,7 @@ tekhex_mkobject (abfd)
tdata_type *tdata = (tdata_type *) bfd_alloc (abfd, sizeof (tdata_type));
if (!tdata)
- {
- bfd_set_error (bfd_error_no_memory);
- return false;
- }
+ return false;
abfd->tdata.tekhex_data = tdata;
tdata->type = 1;
tdata->head = (tekhex_data_list_type *) NULL;
@@ -925,10 +910,7 @@ tekhex_make_empty_symbol (abfd)
(tekhex_symbol_type *) bfd_zalloc (abfd, sizeof (struct tekhex_symbol_struct));
if (!new)
- {
- bfd_set_error (bfd_error_no_memory);
- return NULL;
- }
+ return NULL;
new->symbol.the_bfd = abfd;
new->prev = (struct tekhex_symbol_struct *) NULL;
return &(new->symbol);
@@ -992,6 +974,9 @@ tekhex_print_symbol (ignore_abfd, filep, symbol, how)
#define tekhex_bfd_final_link _bfd_generic_final_link
#define tekhex_bfd_link_split_section _bfd_generic_link_split_section
+#define tekhex_get_section_contents_in_window \
+ _bfd_generic_get_section_contents_in_window
+
const bfd_target tekhex_vec =
{
"tekhex", /* name */
@@ -1006,7 +991,6 @@ const bfd_target tekhex_vec =
0, /* leading underscore */
' ', /* ar_pad_char */
16, /* ar_max_namelen */
- 1, /* minimum alignment */
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */