From c5a06cd2a5f48351b273872ed3e4a2d63d29e459 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 24 Aug 2005 19:50:14 +0000 Subject: [PATCH] One more elflint version symbol test. --- src/ChangeLog | 5 +++++ src/elflint.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 6aa7e7f87..7707ac173 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-08-24 Ulrich Drepper + + * elflint.c (check_versym): Versioned symbols should not have + local binding. + 2005-08-15 Ulrich Drepper * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be diff --git a/src/elflint.c b/src/elflint.c index 206a82b33..d91ac0f87 100644 --- a/src/elflint.c +++ b/src/elflint.c @@ -2063,6 +2063,12 @@ section [%2d] '%s': symbol %d: local symbol with global scope\n"), } else if (*versym != VER_NDX_LOCAL) { + /* Versioned symbol. Make sure it is not defined as local. */ + if (!gnuld && GELF_ST_BIND (sym->st_info) == STB_LOCAL) + ERROR (gettext ("\ +section [%2d] '%s': symbol %d: local symbol with version\n"), + idx, section_name (ebl, idx), cnt); + /* Look through the list of defined versions and locate the index we need for this symbol. */ struct version_namelist *runp = version_namelist; -- 2.47.2