+2017-04-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
+       has_bnd_reloc.
+       (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
+       (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
+       (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
+       (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
+       has_bnd_reloc.
+
 2017-04-27  H.J. Lu  <hongjiu.lu@intel.com>
 
        * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
 
      real definition and check it when allowing copy reloc in PIE.  */
   unsigned int needs_copy : 1;
 
-  /* TRUE if symbol has at least one BND relocation.  */
-  unsigned int has_bnd_reloc : 1;
-
   /* TRUE if symbol has GOT or PLT relocations.  */
   unsigned int has_got_reloc : 1;
 
      GOT and PLT relocations against the same function.  */
   union gotplt_union plt_got;
 
-  /* Information about the second PLT entry. Filled when has_bnd_reloc is
+  /* Information about the second PLT entry. Filled when info>bndplt is
      set.  */
   union gotplt_union plt_bnd;
 
       eh->dyn_relocs = NULL;
       eh->tls_type = GOT_UNKNOWN;
       eh->needs_copy = 0;
-      eh->has_bnd_reloc = 0;
       eh->has_got_reloc = 0;
       eh->has_non_got_reloc = 0;
       eh->no_finish_dynamic_symbol = 0;
   edir = (struct elf_x86_64_link_hash_entry *) dir;
   eind = (struct elf_x86_64_link_hash_entry *) ind;
 
-  edir->has_bnd_reloc |= eind->has_bnd_reloc;
   edir->has_got_reloc |= eind->has_got_reloc;
   edir->has_non_got_reloc |= eind->has_non_got_reloc;
 
                  && (get_elf_x86_64_backend_data (abfd)
                      == &elf_x86_64_arch_bed))
                {
-                 elf_x86_64_hash_entry (h)->has_bnd_reloc = 1;
-
                  /* Create the second PLT for Intel MPX support.  */
                  if (htab->plt_bnd == NULL)
                    {
          /* Use the second PLT with BND relocations.  */
          const bfd_byte *plt_entry, *plt2_entry;
 
-         if (eh->has_bnd_reloc)
+         if (info->bndplt)
            {
              plt_entry = elf_x86_64_bnd_plt_entry;
              plt2_entry = elf_x86_64_bnd_plt2_entry;
         are the identical.  */
       plt_got_insn_size = elf_x86_64_bnd_arch_bed.plt_got_insn_size;
       plt_got_offset = elf_x86_64_bnd_arch_bed.plt_got_offset;
-      if (eh->has_bnd_reloc)
+      if (info->bndplt)
        got_plt_entry = elf_x86_64_bnd_plt2_entry;
       else
        {