readelf verdef and verneed
authorAlan Modra <amodra@gmail.com>
Tue, 3 Nov 2015 09:03:27 +0000 (19:33 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 3 Nov 2015 12:22:05 +0000 (22:52 +1030)
commitab2733963604205afbcc1bc164048864e955c8ff
treea8d2e374a0645586e7e4f0c1edda2ed2bf488e92
parentc1e7d6a827c40a56816e3cd8e3815790197fa41b
readelf verdef and verneed

readelf ought to notify when a symbol wrongly has both a version
definition and a needed version.  This patch does that, and removes
the heuristic that only defined symbols in SHT_NOBITS sections have
verneed entries.

* readelf (process_version_sections): Check DT_VERNEED and
DT_VERDEF for all symbols.  Report "*both*" should a symbol
have both a verneed and verdef.
(get_symbol_version_string): Reduce indentation by early
exits.  Don't use SHT_NOBITS heuristic to detect case where a
defined symbol has a verneed entry.
binutils/ChangeLog
binutils/readelf.c