* ldgram.y (vers_node): Support anonymous version tags.
[deliverable/binutils-gdb.git] / bfd / elflink.h
index f5eb2771929cdcbc1bc4424544f30cfa6efc1d52..00872600f1b777df35c9e735785c07b32e7714af 100644 (file)
@@ -3246,6 +3246,10 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
          just linking a regular application.  */
       verdefs = asvinfo.verdefs;
 
+      /* Skip anonymous version tag.  */
+      if (verdefs != NULL && verdefs->vernum == 0)
+       verdefs = verdefs->next;
+
       if (verdefs == NULL)
        _bfd_strip_section_from_output (info, s);
       else
@@ -4307,6 +4311,9 @@ elf_link_assign_sym_version (h, data)
          t->used = true;
 
          version_index = 1;
+         /* Don't count anonymous version tag.  */
+         if (sinfo->verdefs != NULL && sinfo->verdefs->vernum == 0)
+           version_index = 0;
          for (pp = &sinfo->verdefs; *pp != NULL; pp = &(*pp)->next)
            ++version_index;
          t->vernum = version_index;
This page took 0.035224 seconds and 4 git commands to generate.