"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.
2005-12-27 Alan Modra <amodra@bigpond.net.au>
+ * 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.
+
+2005-12-27 Alan Modra <amodra@bigpond.net.au>
+
* Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
* po/SRC-POTFILES.in: Regenerate.
/* Get the address of the target of this branch. */
value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
- dot = (link_order->offset
+ dot = (input_section->output_offset
+ dst_address
+ link_order->u.indirect.section->output_section->vma);
value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
/* Get the address of the instruction (not the reloc). */
- dot = (link_order->offset
+ dot = (input_section->output_offset
+ dst_address
+ link_order->u.indirect.section->output_section->vma + 1);
value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
/* Get the address of the next instruction. */
- dot = (link_order->offset
+ dot = (input_section->output_offset
+ dst_address
+ link_order->u.indirect.section->output_section->vma + 1);
value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
/* Get the address of the instruction (not the reloc). */
- dot = (link_order->offset
+ dot = (input_section->output_offset
+ dst_address
+ link_order->u.indirect.section->output_section->vma - 1);
value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
/* Get the address of the instruction (not the reloc). */
- dot = (link_order->offset
+ dot = (input_section->output_offset
+ dst_address
+ link_order->u.indirect.section->output_section->vma + 2);
/* Get the address of the target of this branch. */
value = bfd_coff_reloc16_get_value (reloc, link_info, input_section);
- dot = (link_order->offset
+ dot = (input_section->output_offset
+ dst_address
+ link_order->u.indirect.section->output_section->vma) + 1;
/* BFD back-end for Renesas H8/500 COFF binaries.
- Copyright 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2004
+ Copyright 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Contributed by Cygnus Support.
Written by Steve Chamberlain, <sac@cygnus.com>.
{
bfd_vma dst = bfd_coff_reloc16_get_value (reloc, link_info,
input_section);
- bfd_vma dot = link_order->offset
- + *dst_ptr
- + link_order->u.indirect.section->output_section->vma;
+ bfd_vma dot = (*dst_ptr
+ + input_section->output_offset
+ + input_section->output_section->vma);
int gap = dst - dot - 1; /* -1 since were in the odd byte of the
word and the pc's been incremented. */
{
bfd_vma dst = bfd_coff_reloc16_get_value (reloc, link_info,
input_section);
- bfd_vma dot = link_order->offset
- + *dst_ptr
- + link_order->u.indirect.section->output_section->vma;
+ bfd_vma dot = (*dst_ptr
+ + input_section->output_offset
+ + input_section->output_section->vma);
int gap = dst - dot - 1; /* -1 since were in the odd byte of the
word and the pc's been incremented. */
/* 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, <sac@cygnus.com>.
{
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)
{
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. */
{
bfd_vma dst = bfd_coff_reloc16_get_value (reloc, link_info,
input_section);
- bfd_vma dot = (link_order->offset
- + *dst_ptr
+ bfd_vma dot = (*dst_ptr
+ + input_section->output_offset
+ input_section->output_section->vma);
int gap = dst - dot - 1; /* -1, Since the offset is relative
to the value of PC after reading
{
bfd_vma dst = bfd_coff_reloc16_get_value (reloc, link_info,
input_section);
- bfd_vma dot = (link_order->offset
- + *dst_ptr
+ bfd_vma dot = (*dst_ptr
+ + input_section->output_offset
+ input_section->output_section->vma);
int gap = dst - dot - 1; /* -1, since we're in the odd byte of the
word and the pc's been incremented. */
{
bfd_vma dst = bfd_coff_reloc16_get_value (reloc, link_info,
input_section);
- bfd_vma dot = (link_order->offset
- + *dst_ptr
+ bfd_vma dot = (*dst_ptr
+ + input_section->output_offset
+ input_section->output_section->vma);
int gap = dst - dot - 1; /* -1, since we're in the odd byte of the
word and the pc's been incremented. */
{
bfd_vma dst = bfd_coff_reloc16_get_value (reloc, link_info,
input_section);
- bfd_vma dot = (link_order->offset
- + *dst_ptr
+ bfd_vma dot = (*dst_ptr
+ + input_section->output_offset
+ input_section->output_section->vma);
int gap = dst - dot - 2;
{
bfd_vma dst = bfd_coff_reloc16_get_value (reloc, link_info,
input_section);
- bfd_vma dot = (link_order->offset
- + *dst_ptr
+ bfd_vma dot = (*dst_ptr
+ + input_section->output_offset
+ input_section->output_section->vma);
int gap = dst - dot - 2;
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);
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);
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)