/* COFF specific linker code.
- Copyright (C) 1994-2019 Free Software Foundation, Inc.
+ Copyright (C) 1994-2020 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
return TRUE;
*pneeded = TRUE;
- return coff_link_add_object_symbols (abfd, info);
+ return bfd_link_add_symbols (abfd, info);
}
/* Add all the symbols from an object file to the hash table. */
bfd_asymbol_name(sym), FALSE, FALSE)
== NULL))
|| (((flaginfo.info->discard == discard_sec_merge
- && (bfd_get_section (sym)->flags & SEC_MERGE)
+ && (bfd_asymbol_section (sym)->flags & SEC_MERGE)
&& ! bfd_link_relocatable (flaginfo.info))
|| flaginfo.info->discard == discard_l)
&& bfd_is_local_label_name (sub, bfd_asymbol_name(sym))))
_bfd_stringtab_free (flaginfo.strtab);
- /* Setting bfd_get_symcount to 0 will cause write_object_contents to
+ /* Setting symcount to 0 will cause write_object_contents to
not try to write out the symbols. */
- bfd_get_symcount (abfd) = 0;
+ abfd->symcount = 0;
return TRUE;
/* Write out the modified section contents. */
if (secdata == NULL || secdata->stab_info == NULL)
{
- file_ptr loc = o->output_offset * bfd_octets_per_byte (output_bfd);
+ file_ptr loc = (o->output_offset
+ * bfd_octets_per_byte (output_bfd, o));
if (! bfd_set_section_contents (output_bfd, o->output_section,
contents, loc, o->size))
return FALSE;
return FALSE;
rstat = _bfd_relocate_contents (howto, output_bfd,
- (bfd_vma) link_order->u.reloc.p->addend,\
+ (bfd_vma) link_order->u.reloc.p->addend,
buf);
switch (rstat)
{
(*flaginfo->info->callbacks->reloc_overflow)
(flaginfo->info, NULL,
(link_order->type == bfd_section_reloc_link_order
- ? bfd_section_name (output_bfd,
- link_order->u.reloc.p->u.section)
+ ? bfd_section_name (link_order->u.reloc.p->u.section)
: link_order->u.reloc.p->u.name),
howto->name, link_order->u.reloc.p->addend,
(bfd *) NULL, (asection *) NULL, (bfd_vma) 0);
break;
}
- loc = link_order->offset * bfd_octets_per_byte (output_bfd);
+ loc = link_order->offset * bfd_octets_per_byte (output_bfd,
+ output_section);
ok = bfd_set_section_contents (output_bfd, output_section, buf,
loc, size);
free (buf);