X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Fcofflink.c;h=0ca8649dff894a33857bb0159c7499d10522fc01;hb=3cb5a3a16af2cae1a5059b7571c514b3fa575df9;hp=7bcc1ca77da436f38ce46a3606605e8f0374bac9;hpb=e6f7f6d14f7e1acba0cf41726616a270e7d3c121;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/cofflink.c b/bfd/cofflink.c index 7bcc1ca77d..0ca8649dff 100644 --- a/bfd/cofflink.c +++ b/bfd/cofflink.c @@ -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, o)); if (! bfd_set_section_contents (output_bfd, o->output_section, contents, loc, o->size)) return FALSE; @@ -2833,7 +2834,7 @@ _bfd_coff_reloc_link_order (bfd *output_bfd, 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) { @@ -2846,14 +2847,14 @@ _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, + output_section); ok = bfd_set_section_contents (output_bfd, output_section, buf, loc, size); free (buf);