aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2001-12-18 12:15:35 +0000
committerJakub Jelinek <jakub@redhat.com>2001-12-18 12:15:35 +0000
commit6b9b879a0267f1d994d3d4fbdcbcc2d6643498df (patch)
tree2a1339c63dc23a0489e64506aa735f71abf3a2c8 /bfd/elflink.h
parentb667df2e28e04351ea2ee5b6fd32b51d4a302130 (diff)
downloadgdb-6b9b879a0267f1d994d3d4fbdcbcc2d6643498df.zip
gdb-6b9b879a0267f1d994d3d4fbdcbcc2d6643498df.tar.gz
gdb-6b9b879a0267f1d994d3d4fbdcbcc2d6643498df.tar.bz2
* ldgram.y (vers_node): Support anonymous version tags.
* ldlang.c (lang_register_vers_node): Ensure anonymous version tag is not defined together with non-anonymous versions. * ld.texinfo: Document it. * elflink.h (size_dynamic_sections): Skip anonymous version tag. (elf_link_assign_sym_version): Don't count anonymous version tag.
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index f5eb277..0087260 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -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;