summaryrefslogtreecommitdiff
path: root/bfd/coff-x86_64.c
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2009-10-23 11:30:25 +0000
committerKai Tietz <kai.tietz@onevision.com>2009-10-23 11:30:25 +0000
commit0f46c87233ad420e129f4894765f30667673c2c3 (patch)
tree806e9594484d5cb8965c12adfbfd475e967affff /bfd/coff-x86_64.c
parent4d2041b723966e3712d63de54a670d0ddd8898f5 (diff)
downloadbinutils-redhat-0f46c87233ad420e129f4894765f30667673c2c3.tar.gz
2009-10-23 Kai Tietz <kai.tietz@onevision.com>
* coff-x86_64.c (coff_amd64_rtype_to_howto): Subtract offset of R_AMD64_PCRLONG_<X> relocations from addend.
Diffstat (limited to 'bfd/coff-x86_64.c')
-rw-r--r--bfd/coff-x86_64.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/bfd/coff-x86_64.c b/bfd/coff-x86_64.c
index ecce9f40c8..08ada5a6c1 100644
--- a/bfd/coff-x86_64.c
+++ b/bfd/coff-x86_64.c
@@ -550,16 +550,16 @@ coff_amd64_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
bfd_set_error (bfd_error_bad_value);
return NULL;
}
- if (rel->r_type >= R_AMD64_PCRLONG_1 && rel->r_type <= R_AMD64_PCRLONG_5)
- {
- rel->r_vaddr += (bfd_vma)(rel->r_type-R_AMD64_PCRLONG);
- rel->r_type = R_AMD64_PCRLONG;
- }
howto = howto_table + rel->r_type;
#if defined(COFF_WITH_PE)
/* Cancel out code in _bfd_coff_generic_relocate_section. */
*addendp = 0;
+ if (rel->r_type >= R_AMD64_PCRLONG_1 && rel->r_type <= R_AMD64_PCRLONG_5)
+ {
+ *addendp -= (bfd_vma)(rel->r_type - R_AMD64_PCRLONG);
+ rel->r_type = R_AMD64_PCRLONG;
+ }
#endif
if (howto->pc_relative)