From: Ulrich Drepper Date: Tue, 16 Aug 2005 04:23:02 +0000 (+0000) Subject: Relax elflint a bit more. X-Git-Tag: elfutils-0.120~109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61655e08ba36430de47381cefdf10d0c26aa8480;p=thirdparty%2Felfutils.git Relax elflint a bit more. --- diff --git a/src/ChangeLog b/src/ChangeLog index 0e7e68359..6aa7e7f87 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2005-08-15 Ulrich Drepper + * elflint.c (check_versym): Allow VER_NDX_LOCAL symbols to be + undefined. + * Makefile.am: Add rules to build ranlib. * ranlib.c: New file. diff --git a/src/elflint.c b/src/elflint.c index 53abf8495..206a82b33 100644 --- a/src/elflint.c +++ b/src/elflint.c @@ -2053,17 +2053,7 @@ section [%2d] '%s': symbol %d: cannot read version data\n"), /* Already reported elsewhere. */ continue; - if (*versym == VER_NDX_LOCAL) - { - /* Local symbol. Make sure it is defined unless the - reference is weak. */ - if (sym->st_shndx == SHN_UNDEF - && GELF_ST_BIND (sym->st_info) != STB_WEAK) - ERROR (gettext ("\ -section [%2d] '%s': symbol %d: undefined symbol with local scope\n"), - idx, section_name (ebl, idx), cnt); - } - else if (*versym == VER_NDX_GLOBAL) + if (*versym == VER_NDX_GLOBAL) { /* Global symbol. Make sure it is not defined as local. */ if (GELF_ST_BIND (sym->st_info) == STB_LOCAL) @@ -2071,7 +2061,7 @@ section [%2d] '%s': symbol %d: undefined symbol with local scope\n"), section [%2d] '%s': symbol %d: local symbol with global scope\n"), idx, section_name (ebl, idx), cnt); } - else + else if (*versym != VER_NDX_LOCAL) { /* Look through the list of defined versions and locate the index we need for this symbol. */