x86-64: Rename .plt.bnd to .plt.sec
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 11 May 2017 18:26:26 +0000 (11:26 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 11 May 2017 18:28:16 +0000 (11:28 -0700)
Rename .plt.bnd to .plt.sec to indicate that this is used as the second
PLT section.  There is no change in run-time behavior.  We also scan the
.plt.sec section to synthesize PLT symbols.

bfd/

* elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
to plt_second.
(elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
to plt_second/plt_second_eh_frame.
(elf_x86_64_link_hash_newfunc): Updated.
(elf_x86_64_allocate_dynrelocs): Likewise.
(elf_x86_64_size_dynamic_sections): Likewise.
(elf_x86_64_relocate_section): Likewise.
(elf_x86_64_finish_dynamic_symbol): Likewise.
(elf_x86_64_finish_dynamic_sections): Likewise.
(elf_x86_64_plt_type): Rename plt_bnd to plt_second.
(elf_x86_64_get_synthetic_symtab): Updated.  Also scan the
.plt.sec section.
(elf_backend_setup_gnu_properties): Updated.  Create the
.plt.sec section instead of the .plt.sec section.

ld/

* emulparams/elf_x86_64.sh (TINY_READONLY_SECTION): Replace
.plt.bnd with .plt.sec.
* testsuite/ld-x86-64/bnd-ifunc-1-now.d: Likewise.
* testsuite/ld-x86-64/bnd-ifunc-2-now.d: Likewise.
* testsuite/ld-x86-64/bnd-ifunc-2.d: Likewise.
* testsuite/ld-x86-64/bnd-plt-1-now.d: Likewise.
* testsuite/ld-x86-64/bnd-plt-1.d: Likewise.
* testsuite/ld-x86-64/mpx3.dd: Likewise.
* testsuite/ld-x86-64/mpx3n.dd: Likewise.
* testsuite/ld-x86-64/mpx4.dd: Likewise.
* testsuite/ld-x86-64/mpx4n.dd: Likewise.
* testsuite/ld-x86-64/plt-main-bnd-now.rd: Likewise.
* testsuite/ld-x86-64/pr21038b-now.d: Likewise.
* testsuite/ld-x86-64/pr21038b.d: Likewise.
* testsuite/ld-x86-64/pr21038c-now.d: Likewise.
* testsuite/ld-x86-64/pr21038c.d: Likewise.

18 files changed:
bfd/ChangeLog
bfd/elf64-x86-64.c
ld/ChangeLog
ld/emulparams/elf_x86_64.sh
ld/testsuite/ld-x86-64/bnd-ifunc-1-now.d
ld/testsuite/ld-x86-64/bnd-ifunc-2-now.d
ld/testsuite/ld-x86-64/bnd-ifunc-2.d
ld/testsuite/ld-x86-64/bnd-plt-1-now.d
ld/testsuite/ld-x86-64/bnd-plt-1.d
ld/testsuite/ld-x86-64/mpx3.dd
ld/testsuite/ld-x86-64/mpx3n.dd
ld/testsuite/ld-x86-64/mpx4.dd
ld/testsuite/ld-x86-64/mpx4n.dd
ld/testsuite/ld-x86-64/plt-main-bnd-now.rd
ld/testsuite/ld-x86-64/pr21038b-now.d
ld/testsuite/ld-x86-64/pr21038b.d
ld/testsuite/ld-x86-64/pr21038c-now.d
ld/testsuite/ld-x86-64/pr21038c.d

index 05c3837..9128808 100644 (file)
@@ -1,5 +1,23 @@
 2017-05-11  H.J. Lu  <hongjiu.lu@intel.com>
 
+       * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
+       to plt_second.
+       (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
+       to plt_second/plt_second_eh_frame.
+       (elf_x86_64_link_hash_newfunc): Updated.
+       (elf_x86_64_allocate_dynrelocs): Likewise.
+       (elf_x86_64_size_dynamic_sections): Likewise.
+       (elf_x86_64_relocate_section): Likewise.
+       (elf_x86_64_finish_dynamic_symbol): Likewise.
+       (elf_x86_64_finish_dynamic_sections): Likewise.
+       (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
+       (elf_x86_64_get_synthetic_symtab): Updated.  Also scan the
+       .plt.sec section.
+       (elf_backend_setup_gnu_properties): Updated.  Create the
+       .plt.sec section instead of the .plt.sec section.
+
+2017-05-11  H.J. Lu  <hongjiu.lu@intel.com>
+
        * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
        commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
        * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
index 8b217b4..c77725d 100644 (file)
@@ -936,9 +936,8 @@ struct elf_x86_64_link_hash_entry
      GOT and PLT relocations against the same function.  */
   union gotplt_union plt_got;
 
-  /* Information about the second PLT entry. Filled when info>bndplt is
-     set.  */
-  union gotplt_union plt_bnd;
+  /* Information about the second PLT entry.   */
+  union gotplt_union plt_second;
 
   /* Offset of the GOTPLT entry reserved for the TLS descriptor,
      starting at the end of the jump table.  */
@@ -989,8 +988,8 @@ struct elf_x86_64_link_hash_table
   /* Short-cuts to get to dynamic linker sections.  */
   asection *interp;
   asection *plt_eh_frame;
-  asection *plt_bnd;
-  asection *plt_bnd_eh_frame;
+  asection *plt_second;
+  asection *plt_second_eh_frame;
   asection *plt_got;
   asection *plt_got_eh_frame;
 
@@ -1089,7 +1088,7 @@ elf_x86_64_link_hash_newfunc (struct bfd_hash_entry *entry,
       eh->no_finish_dynamic_symbol = 0;
       eh->tls_get_addr = 2;
       eh->func_pointer_refcount = 0;
-      eh->plt_bnd.offset = (bfd_vma) -1;
+      eh->plt_second.offset = (bfd_vma) -1;
       eh->plt_got.offset = (bfd_vma) -1;
       eh->tlsdesc_got = (bfd_vma) -1;
     }
@@ -3036,13 +3035,13 @@ elf_x86_64_allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
                                               * plt_entry_size),
                                              GOT_ENTRY_SIZE, TRUE))
        {
-         asection *s = htab->plt_bnd;
+         asection *s = htab->plt_second;
          if (h->plt.offset != (bfd_vma) -1 && s != NULL)
            {
-             /* Use the .plt.bnd section if it is created.  */
-             eh->plt_bnd.offset = s->size;
+             /* Use the second PLT section if it is created.  */
+             eh->plt_second.offset = s->size;
 
-             /* Make room for this entry in the .plt.bnd section.  */
+             /* Make room for this entry in the second PLT section.  */
              s->size += htab->non_lazy_plt->plt_entry_size;
            }
 
@@ -3078,7 +3077,7 @@ elf_x86_64_allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
          || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h))
        {
          asection *s = htab->elf.splt;
-         asection *bnd_s = htab->plt_bnd;
+         asection *second_s = htab->plt_second;
          asection *got_s = htab->plt_got;
 
          /* If this is the first .plt entry, make room for the special
@@ -3092,8 +3091,8 @@ elf_x86_64_allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
          else
            {
              h->plt.offset = s->size;
-             if (bnd_s)
-               eh->plt_bnd.offset = bnd_s->size;
+             if (second_s)
+               eh->plt_second.offset = second_s->size;
            }
 
          /* If this symbol is not defined in a regular file, and we are
@@ -3113,12 +3112,12 @@ elf_x86_64_allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
                }
              else
                {
-                 if (bnd_s)
+                 if (second_s)
                    {
-                     /* We need to make a call to the entry of the second
-                        PLT instead of regular PLT entry.  */
-                     h->root.u.def.section = bnd_s;
-                     h->root.u.def.value = eh->plt_bnd.offset;
+                     /* We need to make a call to the entry of the
+                        second PLT instead of regular PLT entry.  */
+                     h->root.u.def.section = second_s;
+                     h->root.u.def.value = eh->plt_second.offset;
                    }
                  else
                    {
@@ -3134,8 +3133,8 @@ elf_x86_64_allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
          else
            {
              s->size += plt_entry_size;
-             if (bnd_s)
-               bnd_s->size += htab->non_lazy_plt->plt_entry_size;
+             if (second_s)
+               second_s->size += htab->non_lazy_plt->plt_entry_size;
 
              /* We also need to make an entry in the .got.plt section,
                 which will be placed in the .got section by the linker
@@ -3762,13 +3761,13 @@ elf_x86_64_size_dynamic_sections (bfd *output_bfd,
        htab->plt_got_eh_frame->size
          = htab->non_lazy_plt->eh_frame_plt_size;
 
-      /* Unwind info for .plt.bnd and .plt.got sections are
+      /* Unwind info for the second PLT and .plt.got sections are
         identical.  */
-      if (htab->plt_bnd_eh_frame != NULL
-         && htab->plt_bnd != NULL
-         && htab->plt_bnd->size != 0
-         && !bfd_is_abs_section (htab->plt_bnd->output_section))
-       htab->plt_bnd_eh_frame->size
+      if (htab->plt_second_eh_frame != NULL
+         && htab->plt_second != NULL
+         && htab->plt_second->size != 0
+         && !bfd_is_abs_section (htab->plt_second->output_section))
+       htab->plt_second_eh_frame->size
          = htab->non_lazy_plt->eh_frame_plt_size;
     }
 
@@ -3785,11 +3784,11 @@ elf_x86_64_size_dynamic_sections (bfd *output_bfd,
          || s == htab->elf.sgotplt
          || s == htab->elf.iplt
          || s == htab->elf.igotplt
-         || s == htab->plt_bnd
+         || s == htab->plt_second
          || s == htab->plt_got
          || s == htab->plt_eh_frame
          || s == htab->plt_got_eh_frame
-         || s == htab->plt_bnd_eh_frame
+         || s == htab->plt_second_eh_frame
          || s == htab->elf.sdynbss
          || s == htab->elf.sdynrelro)
        {
@@ -3861,14 +3860,14 @@ elf_x86_64_size_dynamic_sections (bfd *output_bfd,
                   + PLT_FDE_LEN_OFFSET));
     }
 
-  if (htab->plt_bnd_eh_frame != NULL
-      && htab->plt_bnd_eh_frame->contents != NULL)
+  if (htab->plt_second_eh_frame != NULL
+      && htab->plt_second_eh_frame->contents != NULL)
     {
-      memcpy (htab->plt_bnd_eh_frame->contents,
+      memcpy (htab->plt_second_eh_frame->contents,
              htab->non_lazy_plt->eh_frame_plt,
-             htab->plt_bnd_eh_frame->size);
-      bfd_put_32 (dynobj, htab->plt_bnd->size,
-                 (htab->plt_bnd_eh_frame->contents
+             htab->plt_second_eh_frame->size);
+      bfd_put_32 (dynobj, htab->plt_second->size,
+                 (htab->plt_second_eh_frame->contents
                   + PLT_FDE_LEN_OFFSET));
     }
 
@@ -4333,10 +4332,10 @@ elf_x86_64_relocate_section (bfd *output_bfd,
          /* STT_GNU_IFUNC symbol must go through PLT.  */
          if (htab->elf.splt != NULL)
            {
-             if (htab->plt_bnd != NULL)
+             if (htab->plt_second != NULL)
                {
-                 resolved_plt = htab->plt_bnd;
-                 plt_offset = eh->plt_bnd.offset;
+                 resolved_plt = htab->plt_second;
+                 plt_offset = eh->plt_second.offset;
                }
              else
                {
@@ -4697,10 +4696,10 @@ do_ifunc_pointer:
                  resolved_plt = htab->plt_got;
                  plt_offset = eh->plt_got.offset;
                }
-             else if (htab->plt_bnd != NULL)
+             else if (htab->plt_second != NULL)
                {
-                 resolved_plt = htab->plt_bnd;
-                 plt_offset = eh->plt_bnd.offset;
+                 resolved_plt = htab->plt_second;
+                 plt_offset = eh->plt_second.offset;
                }
              else
                {
@@ -4740,10 +4739,10 @@ do_ifunc_pointer:
 
          if (h->plt.offset != (bfd_vma) -1)
            {
-             if (htab->plt_bnd != NULL)
+             if (htab->plt_second != NULL)
                {
-                 resolved_plt = htab->plt_bnd;
-                 plt_offset = eh->plt_bnd.offset;
+                 resolved_plt = htab->plt_second;
+                 plt_offset = eh->plt_second.offset;
                }
              else
                {
@@ -5647,7 +5646,7 @@ elf_x86_64_finish_dynamic_symbol (bfd *output_bfd,
                                  Elf_Internal_Sym *sym)
 {
   struct elf_x86_64_link_hash_table *htab;
-  bfd_boolean use_plt_bnd;
+  bfd_boolean use_plt_second;
   struct elf_x86_64_link_hash_entry *eh;
   bfd_boolean local_undefweak;
 
@@ -5655,9 +5654,8 @@ elf_x86_64_finish_dynamic_symbol (bfd *output_bfd,
   if (htab == NULL)
     return FALSE;
 
-  /* Use MPX backend data in case of BND relocation.  Use .plt_bnd
-     section only if there is .plt section.  */
-  use_plt_bnd = htab->elf.splt != NULL && htab->plt_bnd != NULL;
+  /* Use the second PLT section only if there is .plt section.  */
+  use_plt_second = htab->elf.splt != NULL && htab->plt_second != NULL;
 
   eh = (struct elf_x86_64_link_hash_entry *) h;
   if (eh->no_finish_dynamic_symbol)
@@ -5733,14 +5731,14 @@ elf_x86_64_finish_dynamic_symbol (bfd *output_bfd,
       /* Fill in the entry in the procedure linkage table.  */
       memcpy (plt->contents + h->plt.offset, htab->plt.plt_entry,
              htab->plt.plt_entry_size);
-      if (use_plt_bnd)
+      if (use_plt_second)
        {
-         memcpy (htab->plt_bnd->contents + eh->plt_bnd.offset,
+         memcpy (htab->plt_second->contents + eh->plt_second.offset,
                  htab->non_lazy_plt->plt_entry,
                  htab->non_lazy_plt->plt_entry_size);
 
-         resolved_plt = htab->plt_bnd;
-         plt_offset = eh->plt_bnd.offset;
+         resolved_plt = htab->plt_second;
+         plt_offset = eh->plt_second.offset;
        }
       else
        {
@@ -5968,10 +5966,10 @@ elf_x86_64_finish_dynamic_symbol (bfd *output_bfd,
              /* For non-shared object, we can't use .got.plt, which
                 contains the real function addres if we need pointer
                 equality.  We load the GOT entry with the PLT entry.  */
-             if (htab->plt_bnd != NULL)
+             if (htab->plt_second != NULL)
                {
-                 plt = htab->plt_bnd;
-                 plt_offset = eh->plt_bnd.offset;
+                 plt = htab->plt_second;
+                 plt_offset = eh->plt_second.offset;
                }
              else
                {
@@ -6274,8 +6272,8 @@ elf_x86_64_finish_dynamic_sections (bfd *output_bfd,
     elf_section_data (htab->plt_got->output_section)
       ->this_hdr.sh_entsize = htab->non_lazy_plt->plt_entry_size;
 
-  if (htab->plt_bnd != NULL && htab->plt_bnd->size > 0)
-    elf_section_data (htab->plt_bnd->output_section)
+  if (htab->plt_second != NULL && htab->plt_second->size > 0)
+    elf_section_data (htab->plt_second->output_section)
       ->this_hdr.sh_entsize = htab->non_lazy_plt->plt_entry_size;
 
   /* GOT is always created in setup_gnu_properties.  But it may not be
@@ -6361,29 +6359,31 @@ elf_x86_64_finish_dynamic_sections (bfd *output_bfd,
        }
     }
 
-  /* Adjust .eh_frame for .plt.bnd section.  */
-  if (htab->plt_bnd_eh_frame != NULL
-      && htab->plt_bnd_eh_frame->contents != NULL)
+  /* Adjust .eh_frame for the second PLT section.  */
+  if (htab->plt_second_eh_frame != NULL
+      && htab->plt_second_eh_frame->contents != NULL)
     {
-      if (htab->plt_bnd != NULL
-         && htab->plt_bnd->size != 0
-         && (htab->plt_bnd->flags & SEC_EXCLUDE) == 0
-         && htab->plt_bnd->output_section != NULL
-         && htab->plt_bnd_eh_frame->output_section != NULL)
+      if (htab->plt_second != NULL
+         && htab->plt_second->size != 0
+         && (htab->plt_second->flags & SEC_EXCLUDE) == 0
+         && htab->plt_second->output_section != NULL
+         && htab->plt_second_eh_frame->output_section != NULL)
        {
-         bfd_vma plt_start = htab->plt_bnd->output_section->vma;
-         bfd_vma eh_frame_start = htab->plt_bnd_eh_frame->output_section->vma
-                                  + htab->plt_bnd_eh_frame->output_offset
-                                  + PLT_FDE_START_OFFSET;
+         bfd_vma plt_start = htab->plt_second->output_section->vma;
+         bfd_vma eh_frame_start
+           = (htab->plt_second_eh_frame->output_section->vma
+              + htab->plt_second_eh_frame->output_offset
+              + PLT_FDE_START_OFFSET);
          bfd_put_signed_32 (dynobj, plt_start - eh_frame_start,
-                            htab->plt_bnd_eh_frame->contents
+                            htab->plt_second_eh_frame->contents
                             + PLT_FDE_START_OFFSET);
        }
-      if (htab->plt_bnd_eh_frame->sec_info_type == SEC_INFO_TYPE_EH_FRAME)
+      if (htab->plt_second_eh_frame->sec_info_type
+         == SEC_INFO_TYPE_EH_FRAME)
        {
          if (! _bfd_elf_write_section_eh_frame (output_bfd, info,
-                                                htab->plt_bnd_eh_frame,
-                                                htab->plt_bnd_eh_frame->contents))
+                                                htab->plt_second_eh_frame,
+                                                htab->plt_second_eh_frame->contents))
            return FALSE;
        }
     }
@@ -6448,7 +6448,7 @@ enum elf_x86_64_plt_type
 {
   plt_non_lazy = 0,
   plt_lazy = 1 << 0,
-  plt_bnd = 1 << 1,
+  plt_second = 1 << 1,
   plt_unknown = -1
 };
 
@@ -6496,7 +6496,8 @@ elf_x86_64_get_synthetic_symtab (bfd *abfd,
     {
       { ".plt", NULL, NULL, plt_unknown, 0, 0, 0, 0 },
       { ".plt.got", NULL, NULL, plt_non_lazy, 0, 0, 0, 0 },
-      { ".plt.bnd", NULL, NULL, plt_bnd, 0, 0, 0, 0 },
+      { ".plt.sec", NULL, NULL, plt_second, 0, 0, 0, 0 },
+      { ".plt.bnd", NULL, NULL, plt_second, 0, 0, 0, 0 },
       { NULL, NULL, NULL, plt_non_lazy, 0, 0, 0, 0 }
     };
 
@@ -6572,7 +6573,7 @@ elf_x86_64_get_synthetic_symtab (bfd *abfd,
                   && (memcmp (plt_contents + 6,
                               lazy_bnd_plt->plt0_entry + 6, 3) == 0))
            {
-             plt_type = plt_lazy | plt_bnd;
+             plt_type = plt_lazy | plt_second;
              lazy_plt = lazy_bnd_plt;
            }
        }
@@ -6587,13 +6588,13 @@ elf_x86_64_get_synthetic_symtab (bfd *abfd,
        }
 
       if (non_lazy_bnd_plt != NULL
-         && (plt_type == plt_unknown || plt_type == plt_bnd))
+         && (plt_type == plt_unknown || plt_type == plt_second))
        {
          /* Match BND PLT.  */
          if (memcmp (plt_contents, non_lazy_bnd_plt->plt_entry,
                      non_lazy_bnd_plt->plt_got_offset) == 0)
            {
-             plt_type = plt_bnd;
+             plt_type = plt_second;
              non_lazy_plt = non_lazy_bnd_plt;
            }
        }
@@ -6620,8 +6621,8 @@ elf_x86_64_get_synthetic_symtab (bfd *abfd,
          i = 0;
        }
 
-      /* Skip lazy PLT with BND.  */
-      if (plt_type == (plt_lazy |plt_bnd))
+      /* Skip lazy PLT when the second PLT is used.  */
+      if (plt_type == (plt_lazy | plt_second))
        plts[j].count = 0;
       else
        {
@@ -7248,7 +7249,7 @@ error_alignment:
            {
              /* Create the second PLT for Intel MPX support.  */
              sec = bfd_make_section_anyway_with_flags (dynobj,
-                                                       ".plt.bnd",
+                                                       ".plt.sec",
                                                        pltflags);
              if (sec == NULL)
                info->callbacks->einfo (_("%F: failed to create BND PLT section\n"));
@@ -7257,7 +7258,7 @@ error_alignment:
                                              non_lazy_plt_alignment))
                goto error_alignment;
 
-             htab->plt_bnd = sec;
+             htab->plt_second = sec;
            }
        }
 
@@ -7294,7 +7295,7 @@ error_alignment:
              htab->plt_got_eh_frame = sec;
            }
 
-         if (htab->plt_bnd != NULL)
+         if (htab->plt_second != NULL)
            {
              sec = bfd_make_section_anyway_with_flags (dynobj,
                                                        ".eh_frame",
@@ -7305,7 +7306,7 @@ error_alignment:
              if (!bfd_set_section_alignment (dynobj, sec, 3))
                goto error_alignment;
 
-             htab->plt_bnd_eh_frame = sec;
+             htab->plt_second_eh_frame = sec;
            }
        }
     }
index aac1840..92ebbf7 100644 (file)
@@ -1,5 +1,24 @@
 2017-05-11  H.J. Lu  <hongjiu.lu@intel.com>
 
+       * emulparams/elf_x86_64.sh (TINY_READONLY_SECTION): Replace
+       .plt.bnd with .plt.sec.
+       * testsuite/ld-x86-64/bnd-ifunc-1-now.d: Likewise.
+       * testsuite/ld-x86-64/bnd-ifunc-2-now.d: Likewise.
+       * testsuite/ld-x86-64/bnd-ifunc-2.d: Likewise.
+       * testsuite/ld-x86-64/bnd-plt-1-now.d: Likewise.
+       * testsuite/ld-x86-64/bnd-plt-1.d: Likewise.
+       * testsuite/ld-x86-64/mpx3.dd: Likewise.
+       * testsuite/ld-x86-64/mpx3n.dd: Likewise.
+       * testsuite/ld-x86-64/mpx4.dd: Likewise.
+       * testsuite/ld-x86-64/mpx4n.dd: Likewise.
+       * testsuite/ld-x86-64/plt-main-bnd-now.rd: Likewise.
+       * testsuite/ld-x86-64/pr21038b-now.d: Likewise.
+       * testsuite/ld-x86-64/pr21038b.d: Likewise.
+       * testsuite/ld-x86-64/pr21038c-now.d: Likewise.
+       * testsuite/ld-x86-64/pr21038c.d: Likewise.
+
+2017-05-11  H.J. Lu  <hongjiu.lu@intel.com>
+
        * testsuite/ld-i386/plt-pic2.dd: Updated.
        * testsuite/ld-i386/plt2.dd: Likewise.
        * testsuite/ld-i386/plt2.rd: Likewise.
index 6055204..ca6d06c 100644 (file)
@@ -24,7 +24,7 @@ IREL_IN_PLT=
 # Reuse TINY_READONLY_SECTION which is placed right after .plt section.
 TINY_READONLY_SECTION="
 .plt.got      ${RELOCATING-0} : { *(.plt.got) }
-.plt.bnd      ${RELOCATING-0} : { *(.plt.bnd) }
+.plt.sec      ${RELOCATING-0} : { *(.plt.sec) }
 "
 
 if [ "x${host}" = "x${target}" ]; then
index 723f960..73ddc31 100644 (file)
@@ -16,7 +16,7 @@ Disassembly of section .plt:
  +[a-f0-9]+:   f2 e9 e5 ff ff ff       bnd jmpq 1f0 <.plt>
  +[a-f0-9]+:   0f 1f 44 00 00          nopl   0x0\(%rax,%rax,1\)
 
-Disassembly of section .plt.bnd:
+Disassembly of section .plt.sec:
 
 0+210 <\*ABS\*\+0x218@plt>:
  +[a-f0-9]+:   f2 ff 25 39 01 20 00    bnd jmpq \*0x200139\(%rip\)        # 200350 <_GLOBAL_OFFSET_TABLE_\+0x18>
index e36a928..1fbcd17 100644 (file)
@@ -25,7 +25,7 @@ Disassembly of section .plt:
  +[a-f0-9]+:   f2 e9 b5 ff ff ff       bnd jmpq 2b0 <.plt>
  +[a-f0-9]+:   0f 1f 44 00 00          nopl   0x0\(%rax,%rax,1\)
 
-Disassembly of section .plt.bnd:
+Disassembly of section .plt.sec:
 
 0+300 <\*ABS\*\+0x32c@plt>:
  +[a-f0-9]+:   f2 ff 25 59 01 20 00    bnd jmpq \*0x200159\(%rip\)        # 200460 <_GLOBAL_OFFSET_TABLE_\+0x18>
index 306a17d..fc03c17 100644 (file)
@@ -20,7 +20,7 @@
 [      ]*[a-f0-9]+:    f2 e9 b5 ff ff ff       bnd jmpq 2b0 <.*>
 [      ]*[a-f0-9]+:    0f 1f 44 00 00          nopl   0x0\(%rax,%rax,1\)
 
-Disassembly of section .plt.bnd:
+Disassembly of section .plt.sec:
 
 0+300 <\*ABS\*\+0x32c@plt>:
 [      ]*[a-f0-9]+:    f2 ff 25 39 01 20 00    bnd jmpq \*0x200139\(%rip\)        # 200440 <_GLOBAL_OFFSET_TABLE_\+0x18>
index 65462cd..2989f82 100644 (file)
@@ -25,7 +25,7 @@ Disassembly of section .plt:
  +[a-f0-9]+:   f2 e9 b5 ff ff ff       bnd jmpq 290 <.plt>
  +[a-f0-9]+:   0f 1f 44 00 00          nopl   0x0\(%rax,%rax,1\)
 
-Disassembly of section .plt.bnd:
+Disassembly of section .plt.sec:
 
 0+2e0 <foo2@plt>:
  +[a-f0-9]+:   f2 ff 25 61 01 20 00    bnd jmpq \*0x200161\(%rip\)        # 200448 <foo2>
index 6bd50b2..66efb1a 100644 (file)
@@ -25,7 +25,7 @@ Disassembly of section .plt:
 [      ]*[a-f0-9]+:    f2 e9 b5 ff ff ff       bnd jmpq 290 <.*>
 [      ]*[a-f0-9]+:    0f 1f 44 00 00          nopl   0x0\(%rax,%rax,1\)
 
-Disassembly of section .plt.bnd:
+Disassembly of section .plt.sec:
 
 0+2e0 <foo2@plt>:
 [      ]*[a-f0-9]+:    f2 ff 25 41 01 20 00    bnd jmpq \*0x200141\(%rip\)        # 200428 <foo2>
index d5d8049..8ba3d87 100644 (file)
@@ -11,7 +11,7 @@ Disassembly of section .plt:
 [      ]*[a-f0-9]+:    f2 e9 ([0-9a-f]{2} ){4}         bnd jmpq [a-f0-9]+ <.plt>
 [      ]*[a-f0-9]+:    0f 1f 44 00 00          nopl   0x0\(%rax,%rax,1\)
 
-Disassembly of section .plt.bnd:
+Disassembly of section .plt.sec:
 
 0+[a-f0-9]+ <call1@plt>:
 [      ]*[a-f0-9]+:    f2 ff ([0-9a-f]{2} ){5} bnd jmpq \*0x[a-f0-9]+\(%rip\)        # [a-f0-9]+ <call1>
index d8e238e..4dd8c12 100644 (file)
@@ -11,7 +11,7 @@ Disassembly of section .plt:
  +[a-f0-9]+:   f2 e9 e5 ff ff ff       bnd jmpq 400290 <.plt>
  +[a-f0-9]+:   0f 1f 44 00 00          nopl   0x0\(%rax,%rax,1\)
 
-Disassembly of section .plt.bnd:
+Disassembly of section .plt.sec:
 
 0+4002b0 <call1@plt>:
  +[a-f0-9]+:   f2 ff 25 91 01 20 00    bnd jmpq \*0x200191\(%rip\)        # 600448 <call1>
index 1bcb13b..c7af5b2 100644 (file)
@@ -11,7 +11,7 @@ Disassembly of section .plt:
 [      ]*[a-f0-9]+:    f2 e9 e5 ff ff ff       bnd jmpq 400260 <.plt>
 [      ]*[a-f0-9]+:    0f 1f 44 00 00          nopl   0x0\(%rax,%rax,1\)
 
-Disassembly of section .plt.bnd:
+Disassembly of section .plt.sec:
 
 0+400280 <call1@plt>:
 [      ]*[a-f0-9]+:    f2 ff 25 31 01 20 00    bnd jmpq \*0x200131\(%rip\)        # 6003b8 <call1>
index e8777cc..a82be08 100644 (file)
@@ -11,7 +11,7 @@ Disassembly of section .plt:
  +[a-f0-9]+:   f2 e9 e5 ff ff ff       bnd jmpq 400260 <.plt>
  +[a-f0-9]+:   0f 1f 44 00 00          nopl   0x0\(%rax,%rax,1\)
 
-Disassembly of section .plt.bnd:
+Disassembly of section .plt.sec:
 
 0+400280 <call1@plt>:
  +[a-f0-9]+:   f2 ff 25 51 01 20 00    bnd jmpq \*0x200151\(%rip\)        # 6003d8 <call1>
index 460b7e2..2478c1f 100644 (file)
@@ -1,3 +1,3 @@
 #...
- +\[[ 0-9]+\] \.plt\.bnd +.*
+ +\[[ 0-9]+\] \.plt\.sec +.*
 #pass
index 2bafb8d..b9a8c4d 100644 (file)
@@ -1,4 +1,4 @@
-#name: PR ld/21038 (.plt.bnd, -z now)
+#name: PR ld/21038 (.plt.sec, -z now)
 #source: pr21038b.s
 #as: --64
 #ld: -z now -z bndplt -melf_x86_64 -shared -z relro --ld-generated-unwind-info
@@ -57,7 +57,7 @@ Disassembly of section .plt:
  +[a-f0-9]+:   f2 e9 e5 ff ff ff       bnd jmpq 220 <.plt>
  +[a-f0-9]+:   0f 1f 44 00 00          nopl   0x0\(%rax,%rax,1\)
 
-Disassembly of section .plt.bnd:
+Disassembly of section .plt.sec:
 
 0+240 <func@plt>:
  +[a-f0-9]+:   f2 ff 25 b1 0d 20 00    bnd jmpq \*0x200db1\(%rip\)        # 200ff8 <func>
index 69b5c65..3457d4d 100644 (file)
@@ -1,4 +1,4 @@
-#name: PR ld/21038 (.plt.bnd)
+#name: PR ld/21038 (.plt.sec)
 #as: --64
 #ld: -z bndplt -melf_x86_64 -shared -z relro --ld-generated-unwind-info
 #objdump: -dw -Wf
@@ -56,7 +56,7 @@ Disassembly of section .plt:
  +[a-f0-9]+:   f2 e9 e5 ff ff ff       bnd jmpq 220 <.plt>
  +[a-f0-9]+:   0f 1f 44 00 00          nopl   0x0\(%rax,%rax,1\)
 
-Disassembly of section .plt.bnd:
+Disassembly of section .plt.sec:
 
 0+240 <func@plt>:
  +[a-f0-9]+:   f2 ff 25 d1 0d 20 00    bnd jmpq \*0x200dd1\(%rip\)        # 201018 <func>
index bdce4e0..4b6db6f 100644 (file)
@@ -1,4 +1,4 @@
-#name: PR ld/21038 (.plt.got and .plt.bnd, -z now)
+#name: PR ld/21038 (.plt.got and .plt.sec, -z now)
 #source: pr21038c.s
 #as: --64
 #ld: -z now -z bndplt -melf_x86_64 -shared -z relro --ld-generated-unwind-info
@@ -72,7 +72,7 @@ Disassembly of section .plt.got:
  +[a-f0-9]+:   f2 ff 25 71 0d 20 00    bnd jmpq \*0x200d71\(%rip\)        # 200ff8 <func1>
  +[a-f0-9]+:   90                      nop
 
-Disassembly of section .plt.bnd:
+Disassembly of section .plt.sec:
 
 0+288 <func2@plt>:
  +[a-f0-9]+:   f2 ff 25 61 0d 20 00    bnd jmpq \*0x200d61\(%rip\)        # 200ff0 <func2>
index 719a6e1..eb6f207 100644 (file)
@@ -1,4 +1,4 @@
-#name: PR ld/21038 (.plt.got and .plt.bnd)
+#name: PR ld/21038 (.plt.got and .plt.sec)
 #as: --64
 #ld: -z bndplt -melf_x86_64 -shared -z relro --ld-generated-unwind-info
 #objdump: -dw -Wf
@@ -71,7 +71,7 @@ Disassembly of section .plt.got:
  +[a-f0-9]+:   f2 ff 25 71 0d 20 00    bnd jmpq \*0x200d71\(%rip\)        # 200ff8 <func1>
  +[a-f0-9]+:   90                      nop
 
-Disassembly of section .plt.bnd:
+Disassembly of section .plt.sec:
 
 0+288 <func2@plt>:
  +[a-f0-9]+:   f2 ff 25 89 0d 20 00    bnd jmpq \*0x200d89\(%rip\)        # 201018 <func2>