diff options
author | Dave Anglin <dave.anglin@nrc.ca> | 2009-02-15 19:39:44 +0000 |
---|---|---|
committer | Dave Anglin <dave.anglin@nrc.ca> | 2009-02-15 19:39:44 +0000 |
commit | e943be0af0ef5e82bafb7bd47f22704cba666f4a (patch) | |
tree | 462dc335298edc635b1ea1ea51a82ba60e28c1e1 | |
parent | a4569fb8d57c82b3eefa1eb2995f373f9be3c728 (diff) | |
download | binutils-redhat-e943be0af0ef5e82bafb7bd47f22704cba666f4a.tar.gz |
* elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
in branch offset check.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf-hppa.h | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 83d7d0bc17..cd9033d335 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -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, diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h index b371c0e6af..0edf989faa 100644 --- a/bfd/elf-hppa.h +++ b/bfd/elf-hppa.h @@ -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; |