aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf64-x86-64.c13
2 files changed, 12 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 015acda..f8ca71b 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2014-11-18 Igor Zamyatin <igor.zamyatin@intel.com>
+
+ * elf64-x86-64.c (elf_x86_64_check_relocs): Enable MPX PLT only
+ for -z bndplt.
+
2014-11-14 Nick Clifton <nickc@redhat.com>
PR binutils/17597
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index f2b13e7..20f45a9 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -1629,11 +1629,16 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info,
case R_X86_64_PC32_BND:
case R_X86_64_PLT32_BND:
+ case R_X86_64_PC32:
+ case R_X86_64_PLT32:
+ case R_X86_64_32:
+ case R_X86_64_64:
/* MPX PLT is supported only if elf_x86_64_arch_bed
is used in 64-bit mode. */
if (ABI_64_P (abfd)
- && (get_elf_x86_64_backend_data (abfd)
- == &elf_x86_64_arch_bed))
+ && info->bndplt
+ && (get_elf_x86_64_backend_data (abfd)
+ == &elf_x86_64_arch_bed))
{
elf_x86_64_hash_entry (h)->has_bnd_reloc = TRUE;
@@ -1675,11 +1680,7 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info,
}
case R_X86_64_32S:
- case R_X86_64_32:
- case R_X86_64_64:
- case R_X86_64_PC32:
case R_X86_64_PC64:
- case R_X86_64_PLT32:
case R_X86_64_GOTPCREL:
case R_X86_64_GOTPCREL64:
if (htab->elf.dynobj == NULL)