libabigail/include
Dodji Seketeli e5cf9d1f60 Consider default symbol versions when computing added/removed fns/vars
When computing the set of added function or variable symbols, if a
symbol S with no version symbol was present in a given corpus and that
symbol gained a *DEFAULT* version V in the second corpus, we should
not consider that a new symbol S was added (and that the former S was
removed) because:

  1/ S was already present in the first corpus
  2/ applications linked to the first corpus and that were using S
  (with no version) there, will automatically use the S with version V
  in the second corpus, without needing any re-linking; the
  power of symbol versioning!

Rather, it's just that S gained a default symbol version.

This patch implements that.

	* include/abg-corpus.h (corpus::{lookup_function_symbol,
	lookup_variable_symbol}): Take a elf_symbol::version object,
	rather than a string representing the version.  Add an overload
	that takes an elf_symbol.
	* src/abg-corpus.cc (find_symbol_by_version): New static function.
	(corpus::{lookup_function_symbol, lookup_variable_symbol}): Take a
	elf_symbol::version object, rather than a string representing the
	version.  Add an overload that takes an elf_symbol.  If the looked
	up symbol has no version and if the corpus contains a symbol with
	the same name and with a default version, then return that latter
	symbol if the corpus doesn't contain a symbol with the same name
	and empty version.
	* src/abg-comparison.cc
	(class_diff::ensure_lookup_tables_populated): Adjust.
	(corpus_diff::priv::ensure_lookup_tables_populated): Before
	deciding that a symbol has been added, if the symbol has a default
	version, make sure no symbol with the same name and without
	version was present in the former corpus.  Similarly, before
	deciding that a symbol has been removed, if the symbol has no
	version, make sure the latter corpus has no symbol with the same
	name and with a default version.
	* tests/data/test-diff-dwarf/test12-report.txt: Adjust.  The
	function should not be considered as added, because its symbol
	(and version) was already present in the former DSO.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-07-24 14:04:11 +02:00
..
abg-comp-filter.h Bug 17649 Avoid endless looping on diff graph with cycles 2015-02-21 15:16:48 +01:00
abg-comparison.h Add a new corpus_diff::has_net_changes() entry point 2015-07-21 12:48:19 +02:00
abg-config.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-corpus.h Consider default symbol versions when computing added/removed fns/vars 2015-07-24 14:04:11 +02:00
abg-diff-utils.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-dwarf-reader.h Remove the last direct fiddling with ELF from abipkgdiff.cc 2015-07-17 10:09:57 +02:00
abg-fwd.h Fix type synthesis to fix abicompat weak mode 2015-07-20 17:11:32 +02:00
abg-hash.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-ini.h Support specifying data member insertion in suppressions 2015-05-24 23:43:02 +02:00
abg-ir.h Fix style issues 2015-07-24 00:45:03 +02:00
abg-libxml-utils.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-libzip-utils.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-reader.h Handle the life time of the map of canonical types 2015-07-09 11:12:40 +02:00
abg-sptr-utils.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-tools-utils.h Remove use of tmpnam from abilint 2015-07-20 10:06:17 +02:00
abg-traverse.h Canonicalize types either early or late after TU reading 2015-02-18 21:32:37 +01:00
abg-version.h.in Collapse subdir of include to include. 2013-08-14 15:07:18 +02:00
abg-viz-common.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-viz-dot.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-viz-svg.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-writer.h Update copyright years 2015-01-07 17:52:10 +01:00
Makefile.am Expose a new libabigail::tools_utils namespace 2015-01-08 12:28:14 +01:00