]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/coff-z8k.c
* coff-h8300.c (h8300_reloc16_extra_cases): Use input section
[thirdparty/binutils-gdb.git] / bfd / coff-z8k.c
index d2dc3815ad02d59e11ebe0188c96eebfbf3d58dc..8fc2f1692398cb1451654ea0935effae3c184262 100644 (file)
@@ -230,8 +230,8 @@ extra_case (bfd *in_abfd,
       {
        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.  */
@@ -258,8 +258,8 @@ extra_case (bfd *in_abfd,
       {
        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.  */
@@ -289,8 +289,8 @@ extra_case (bfd *in_abfd,
       {
        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;
 
@@ -318,8 +318,8 @@ extra_case (bfd *in_abfd,
       {
        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;