/* dlltool.c -- tool to generate stuff for PE style DLLs
- Copyright (C) 1995-2018 Free Software Foundation, Inc.
+ Copyright (C) 1995-2020 Free Software Foundation, Inc.
This file is part of GNU Binutils.
#include "bucomm.h"
#include "dlltool.h"
#include "safe-ctype.h"
+#include "coff-bfd.h"
#include <time.h>
#include <assert.h>
if (s == NULL)
return;
- size = bfd_get_section_size (s);
+ size = bfd_section_size (s);
buf = xmalloc (size);
bfd_get_section_contents (abfd, s, buf, 0, size);
if (si->id != i)
abort ();
si->sec = bfd_make_section_old_way (abfd, si->name);
- bfd_set_section_flags (abfd,
- si->sec,
- si->flags & applicable);
+ bfd_set_section_flags (si->sec, si->flags & applicable);
- bfd_set_section_alignment(abfd, si->sec, si->align);
+ bfd_set_section_alignment (si->sec, si->align);
si->sec->output_section = si->sec;
si->sym = bfd_make_empty_symbol(abfd);
si->sym->name = si->sec->name;
arelent *imglue, *ba_rel, *ea_rel, *pea_rel;
/* Alignment must be set to 2**2 or you get extra stuff. */
- bfd_set_section_alignment(abfd, sec, 2);
+ bfd_set_section_alignment (sec, 2);
si->size = 4 * 5;
si->data = xmalloc (si->size);
{
sinfo *si = secdata + i;
- bfd_set_section_size (abfd, si->sec, si->size);
- bfd_set_section_vma (abfd, si->sec, vma);
+ bfd_set_section_size (si->sec, si->size);
+ bfd_set_section_vma (si->sec, vma);
}
}
/* Write them out. */
if (ms_style && ((section->flags & SEC_DATA) == 0))
return;
- if ((datasize = bfd_section_size (abfd, section)) == 0)
+ if ((datasize = bfd_section_size (section)) == 0)
return;
data = (bfd_byte *) xmalloc (datasize + 1);