/* Routines to link ECOFF debugging information.
- Copyright (C) 1993-2019 Free Software Foundation, Inc.
+ Copyright (C) 1993-2020 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
#include "bfd.h"
#include "bfdlink.h"
#include "libbfd.h"
+#include "ecoff-bfd.h"
#include "objalloc.h"
#include "aout/stab_gnu.h"
#include "coff/internal.h"
struct bfd_link_info *info)
{
struct accumulate *ainfo;
- bfd_size_type amt = sizeof (struct accumulate);
+ size_t amt = sizeof (struct accumulate);
ainfo = (struct accumulate *) bfd_malloc (amt);
if (!ainfo)
fdr.issBase = output_symhdr->issMax;
fdr.cbSs = 0;
fdr.rss = ecoff_add_string (ainfo, info, output_debug, &fdr,
- input_bfd->filename);
+ bfd_get_filename (input_bfd));
if (fdr.rss == -1)
return FALSE;
fdr.isymBase = output_symhdr->isymMax;
!= swap->external_hdr_size)
goto error_return;
- if (buff != NULL)
- free (buff);
+ free (buff);
return TRUE;
error_return:
- if (buff != NULL)
- free (buff);
+ free (buff);
return FALSE;
}
if (bfd_bwrite (debug->external_ext, amt, abfd) != amt)
goto error_return;
- if (space != NULL)
- free (space);
+ free (space);
return TRUE;
error_return:
- if (space != NULL)
- free (space);
+ free (space);
return FALSE;
}
\f
if (len != 0)
{
- if (line_info->find_buffer != NULL)
- free (line_info->find_buffer);
+ free (line_info->find_buffer);
buffer = (char *) bfd_malloc ((bfd_size_type) len);
+ line_info->find_buffer = buffer;
if (buffer == NULL)
return FALSE;
- line_info->find_buffer = buffer;
}
if (function_name != NULL)