From 44da2da10b10bc7e70095c3dc8737278c9a65149 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/coff-w65.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'bfd/coff-w65.c') diff --git a/bfd/coff-w65.c b/bfd/coff-w65.c index 3119ad6..7a1cfb7 100644 --- a/bfd/coff-w65.c +++ b/bfd/coff-w65.c @@ -1,5 +1,5 @@ /* BFD back-end for WDC 65816 COFF binaries. - Copyright 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004 + Copyright 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Written by Steve Chamberlain, . @@ -316,9 +316,9 @@ w65_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr, { int gap = bfd_coff_reloc16_get_value (reloc, link_info, input_section); - bfd_vma dot = link_order->offset - + dst_address - + link_order->u.indirect.section->output_section->vma; + bfd_vma dot = (dst_address + + input_section->output_offset + + input_section->output_section->vma); gap -= dot + 1; if (gap < -128 || gap > 127) @@ -340,9 +340,9 @@ w65_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr, { bfd_vma gap = bfd_coff_reloc16_get_value (reloc, link_info, input_section); - bfd_vma dot = link_order->offset - + dst_address - + link_order->u.indirect.section->output_section->vma; + bfd_vma dot = (dst_address + + input_section->output_offset + + input_section->output_section->vma); /* This wraps within the page, so ignore the relativeness, look at the high part. */ -- cgit v1.1