summaryrefslogtreecommitdiff
path: root/contrib/binutils/bfd/ecofflink.c
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2002-10-11 06:01:20 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2002-10-11 06:01:20 +0000
commit88e5f95a93c944cdcf31c26c3d93baddc8d18872 (patch)
treefc657a1fb5e0ceeb952b5e5ad8744fec0332849c /contrib/binutils/bfd/ecofflink.c
parentbde4025733b25eb758560c82632106eafd34580e (diff)
downloadsrc-test2-88e5f95a93c944cdcf31c26c3d93baddc8d18872.tar.gz
src-test2-88e5f95a93c944cdcf31c26c3d93baddc8d18872.zip
Notes
Diffstat (limited to 'contrib/binutils/bfd/ecofflink.c')
-rw-r--r--contrib/binutils/bfd/ecofflink.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/contrib/binutils/bfd/ecofflink.c b/contrib/binutils/bfd/ecofflink.c
index 53d65441dbef..5b854af78e33 100644
--- a/contrib/binutils/bfd/ecofflink.c
+++ b/contrib/binutils/bfd/ecofflink.c
@@ -1,5 +1,5 @@
/* Routines to link ECOFF debugging information.
- Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001
+ Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>.
@@ -1314,12 +1314,12 @@ bfd_ecoff_debug_externals (abfd, debug, swap, relocateable, get_extr,
sym_ptr = *sym_ptr_ptr;
/* Get the external symbol information. */
- if ((*get_extr) (sym_ptr, &esym) == false)
+ if (! (*get_extr) (sym_ptr, &esym))
continue;
/* If we're producing an executable, move common symbols into
bss. */
- if (relocateable == false)
+ if (! relocateable)
{
if (esym.asym.sc == scCommon)
esym.asym.sc = scBss;
@@ -1376,20 +1376,18 @@ bfd_ecoff_debug_one_external (abfd, debug, swap, name, esym)
if ((size_t) (debug->ssext_end - debug->ssext)
< symhdr->issExtMax + namelen + 1)
{
- if (ecoff_add_bytes ((char **) &debug->ssext,
- (char **) &debug->ssext_end,
- symhdr->issExtMax + namelen + 1)
- == false)
+ if (! ecoff_add_bytes ((char **) &debug->ssext,
+ (char **) &debug->ssext_end,
+ symhdr->issExtMax + namelen + 1))
return false;
}
if ((size_t) ((char *) debug->external_ext_end
- (char *) debug->external_ext)
< (symhdr->iextMax + 1) * external_ext_size)
{
- if (ecoff_add_bytes ((char **) &debug->external_ext,
- (char **) &debug->external_ext_end,
- (symhdr->iextMax + 1) * (size_t) external_ext_size)
- == false)
+ if (! ecoff_add_bytes ((char **) &debug->external_ext,
+ (char **) &debug->external_ext_end,
+ (symhdr->iextMax + 1) * (size_t) external_ext_size))
return false;
}
@@ -1650,11 +1648,10 @@ ecoff_write_shuffle (abfd, swap, shuffle, space)
bfd_byte *s;
i = swap->debug_align - (total & (swap->debug_align - 1));
- s = (bfd_byte *) bfd_malloc ((bfd_size_type) i);
+ s = (bfd_byte *) bfd_zmalloc ((bfd_size_type) i);
if (s == NULL && i != 0)
return false;
- memset ((PTR) s, 0, i);
if (bfd_bwrite ((PTR) s, (bfd_size_type) i, abfd) != i)
{
free (s);
@@ -1736,10 +1733,10 @@ bfd_ecoff_write_accumulated_debug (handle, abfd, debug, swap, info, where)
bfd_byte *s;
i = swap->debug_align - (total & (swap->debug_align - 1));
- s = (bfd_byte *) bfd_malloc ((bfd_size_type) i);
+ s = (bfd_byte *) bfd_zmalloc ((bfd_size_type) i);
if (s == NULL && i != 0)
goto error_return;
- memset ((PTR) s, 0, i);
+
if (bfd_bwrite ((PTR) s, (bfd_size_type) i, abfd) != i)
{
free (s);
@@ -1761,10 +1758,10 @@ bfd_ecoff_write_accumulated_debug (handle, abfd, debug, swap, info, where)
i = (swap->debug_align
- (debug->symbolic_header.issExtMax & (swap->debug_align - 1)));
- s = (bfd_byte *) bfd_malloc ((bfd_size_type) i);
+ s = (bfd_byte *) bfd_zmalloc ((bfd_size_type) i);
if (s == NULL && i != 0)
goto error_return;
- memset ((PTR) s, 0, i);
+
if (bfd_bwrite ((PTR) s, (bfd_size_type) i, abfd) != i)
{
free (s);