From c85f8860f11b973f51b2ee0e2ae0bc8f2f7b58a4 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 27 Dec 2005 03:06:27 +0000 Subject: * coff-h8300.c (h8300_reloc16_extra_cases): Use input section "output_offset" instead of link order "offset". * coff-h8500.c (extra_case): Likewise. * coff-w65.c (w65_reloc16_extra_cases): Likewise. * coff-z80.c (extra_case): Likewise. * coff-z8k.c (extra_case): Likewise. * linker.c (default_indirect_link_order): Likewise, "size" too. * ecoff.c (ecoff_indirect_link_order): Likewise. --- bfd/linker.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'bfd/linker.c') diff --git a/bfd/linker.c b/bfd/linker.c index 9e6199b835..67fe80451c 100644 --- a/bfd/linker.c +++ b/bfd/linker.c @@ -2717,11 +2717,10 @@ default_indirect_link_order (bfd *output_bfd, BFD_ASSERT ((output_section->flags & SEC_HAS_CONTENTS) != 0); - if (link_order->size == 0) - return TRUE; - input_section = link_order->u.indirect.section; input_bfd = input_section->owner; + if (input_section->size == 0) + return TRUE; BFD_ASSERT (input_section->output_section == output_section); BFD_ASSERT (input_section->output_offset == link_order->offset); @@ -2810,9 +2809,9 @@ default_indirect_link_order (bfd *output_bfd, goto error_return; /* Output the section contents. */ - loc = link_order->offset * bfd_octets_per_byte (output_bfd); + loc = input_section->output_offset * bfd_octets_per_byte (output_bfd); if (! bfd_set_section_contents (output_bfd, output_section, - new_contents, loc, link_order->size)) + new_contents, loc, input_section->size)) goto error_return; if (contents != NULL) -- cgit v1.2.1