X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Fcofflink.c;h=23a8e6b2264c835e8bce75db54c7c527be0279b7;hb=618265039f697eab9e72bb58b95fc2d32925df58;hp=ac07d05e5789812fec774aa6bf8cbe0941c5dfcf;hpb=2219ae0b0ebe14373850b000c2abaa31dab1d741;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/cofflink.c b/bfd/cofflink.c index ac07d05e57..23a8e6b226 100644 --- a/bfd/cofflink.c +++ b/bfd/cofflink.c @@ -221,7 +221,7 @@ coff_link_check_archive_element (bfd *abfd, 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. */ @@ -902,7 +902,7 @@ _bfd_coff_final_link (bfd *abfd, 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)))) @@ -1186,9 +1186,9 @@ _bfd_coff_final_link (bfd *abfd, _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; @@ -2541,7 +2541,8 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) /* 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, NULL)); if (! bfd_set_section_contents (output_bfd, o->output_section, contents, loc, o->size)) return FALSE; @@ -2846,14 +2847,13 @@ _bfd_coff_reloc_link_order (bfd *output_bfd, (*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, NULL); ok = bfd_set_section_contents (output_bfd, output_section, buf, loc, size); free (buf);