Index: coff-x86_64.c =================================================================== RCS file: /cvs/src/src/bfd/coff-x86_64.c,v retrieving revision 1.9 diff -u -r1.9 coff-x86_64.c --- coff-x86_64.c 2 Sep 2009 07:18:36 -0000 1.9 +++ coff-x86_64.c 20 Oct 2009 16:48:45 -0000 @@ -550,16 +550,16 @@ 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)