summaryrefslogtreecommitdiff
path: root/bfd/coff-x86_64.c
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2010-03-31 16:32:01 +0000
committerKai Tietz <kai.tietz@onevision.com>2010-03-31 16:32:01 +0000
commit451ebe82ebae6adc301ec4dd8fb8a3c921a7888c (patch)
treeab9ba2ce1cfa2346ad2d0cd660fff56ebf3ecc75 /bfd/coff-x86_64.c
parent8526ffb77e421cfbfc48b956ac4c3c65f7a0697a (diff)
downloadbinutils-redhat-451ebe82ebae6adc301ec4dd8fb8a3c921a7888c.tar.gz
2010-03-31 Kai Tietz <kai.tietz@onevision.com>
* coff-i386.c (in_reloc_p): Check also for R_SECREL32. * coff-x86_64.c (in_reloc_p): Check also for R_AMD64_SECREL.
Diffstat (limited to 'bfd/coff-x86_64.c')
-rw-r--r--bfd/coff-x86_64.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/bfd/coff-x86_64.c b/bfd/coff-x86_64.c
index 4d500fe7cd..8083d978dd 100644
--- a/bfd/coff-x86_64.c
+++ b/bfd/coff-x86_64.c
@@ -192,7 +192,8 @@ coff_amd64_reloc (bfd *abfd,
static bfd_boolean
in_reloc_p (bfd *abfd ATTRIBUTE_UNUSED, reloc_howto_type *howto)
{
- return ! howto->pc_relative && howto->type != R_AMD64_IMAGEBASE;
+ return ! howto->pc_relative && howto->type != R_AMD64_IMAGEBASE
+ && howto->type != R_AMD64_SECREL;
}
#endif /* COFF_WITH_PE */
@@ -555,10 +556,10 @@ coff_amd64_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
#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;
+ 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