* elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
authorDave Anglin <dave.anglin@nrc.ca>
Sun, 15 Feb 2009 19:39:44 +0000 (19:39 +0000)
committerDave Anglin <dave.anglin@nrc.ca>
Sun, 15 Feb 2009 19:39:44 +0000 (19:39 +0000)
in branch offset check.

bfd/ChangeLog
bfd/elf-hppa.h

index 83d7d0bc17908c95af02256228531f8f75f068a2..cd9033d335535c82e4cfd6486966e55d8b4eaaf6 100644 (file)
@@ -1,3 +1,8 @@
+2009-02-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
+       in branch offset check.
+
 2009-02-15  Alan Modra  <amodra@bigpond.net.au>
 
        * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
index b371c0e6af351ddf0bada4d83a7dc9add4795921..0edf989faa2dcdbc2174a7af1d707328d1fed63d 100644 (file)
@@ -1684,6 +1684,7 @@ elf_hppa_final_link_relocate (Elf_Internal_Rela *rel,
        /* Turn VALUE into a proper PC relative address.  */
        value -= (offset + input_section->output_offset
                  + input_section->output_section->vma);
+       addend -= 8;
 
        if (r_type == (unsigned int) R_PARISC_PCREL22F)
          max_branch_offset = (1 << (22-1)) << 2;
@@ -1708,9 +1709,9 @@ elf_hppa_final_link_relocate (Elf_Internal_Rela *rel,
 
        /* Adjust for any field selectors.  */
        if (r_type == R_PARISC_PCREL17R)
-         value = hppa_field_adjust (value, -8 + addend, e_rsel);
+         value = hppa_field_adjust (value, addend, e_rsel);
        else
-         value = hppa_field_adjust (value, -8 + addend, e_fsel);
+         value = hppa_field_adjust (value, addend, e_fsel);
 
        /* All branches are implicitly shifted by 2 places.  */
        value >>= 2;
This page took 0.02733 seconds and 4 git commands to generate.