libabigail/tests/data/test-diff-dwarf
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
..
libtest9-v0.so Support TLS variables 2014-08-19 13:50:23 +02:00
libtest9-v1.so Support TLS variables 2014-08-19 13:50:23 +02:00
libtest12-v0.so Take symbol versions in account when computing added/removed decls 2014-08-25 23:16:50 +02:00
libtest12-v1.so Take symbol versions in account when computing added/removed decls 2014-08-25 23:16:50 +02:00
libtest18-alias-sym-v0.so Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +02:00
libtest18-alias-sym-v1.so Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +02:00
libtest19-soname-v0.so Support reading and comparing soname from ELF files 2014-12-07 23:42:26 +01:00
libtest19-soname-v1.so Support reading and comparing soname from ELF files 2014-12-07 23:42:26 +01:00
libtest20-add-fn-parm-v0.so Fix classification of parameter addition in C 2014-12-09 13:10:58 +01:00
libtest20-add-fn-parm-v1.so Fix classification of parameter addition in C 2014-12-09 13:10:58 +01:00
libtest21-redundant-fn-v0.so Un-share diff nodes in the comparison IR 2014-12-26 18:45:06 +01:00
libtest21-redundant-fn-v1.so Un-share diff nodes in the comparison IR 2014-12-26 18:45:06 +01:00
libtest22-changed-parm-c-v0.so Un-share diff nodes in the comparison IR 2014-12-26 18:45:06 +01:00
libtest22-changed-parm-c-v1.so Un-share diff nodes in the comparison IR 2014-12-26 18:45:06 +01:00
libtest24-added-fn-parms-v0.so 18252 - Added parameters are not properly sorted 2015-04-15 15:21:56 +02:00
libtest24-added-fn-parms-v1.so 18252 - Added parameters are not properly sorted 2015-04-15 15:21:56 +02:00
libtest25-removed-fn-parms-v0.so 18252 - Added parameters are not properly sorted 2015-04-15 15:21:56 +02:00
libtest25-removed-fn-parms-v1.so 18252 - Added parameters are not properly sorted 2015-04-15 15:21:56 +02:00
libtest26-added-parms-before-variadic-v0.so Bug 18342 - Segmentation fault while comparing functions with variadic parameters 2015-05-05 10:45:06 +02:00
libtest26-added-parms-before-variadic-v1.so Bug 18342 - Segmentation fault while comparing functions with variadic parameters 2015-05-05 10:45:06 +02:00
libtest-23-diff-arch-v0-32.so Detect and report changes in ELF architecture 2015-01-07 17:52:10 +01:00
libtest-23-diff-arch-v0-64.so Detect and report changes in ELF architecture 2015-01-07 17:52:10 +01:00
test0-report.txt Apply suppression specifications to added and removed functions and variables 2015-06-24 12:09:53 +02:00
test0-v0.cc Drop symbols not global in a symtab from corpus symtab 2014-04-21 21:32:39 +02:00
test0-v0.o Drop symbols not global in a symtab from corpus symtab 2014-04-21 21:32:39 +02:00
test0-v1.cc Drop symbols not global in a symtab from corpus symtab 2014-04-21 21:32:39 +02:00
test0-v1.o Drop symbols not global in a symtab from corpus symtab 2014-04-21 21:32:39 +02:00
test1-report.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test1-v0.cc
test1-v0.o
test1-v1.cc
test1-v1.o
test2-report.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test2-v0.cc
test2-v0.o
test2-v1.cc
test2-v1.o
test3-report.txt Misc reporting fixes/improvements 2015-04-14 06:16:00 +02:00
test3-v0.cc
test3-v0.o
test3-v1.cc
test3-v1.o
test4-report.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test4-v0.cc
test4-v0.o
test4-v1.cc
test4-v1.o
test5-report.txt Support filtering out just one alias of a function 2015-07-02 17:15:35 +02:00
test5-v0.cc Really compare return types for function types 2014-04-05 12:42:24 +02:00
test5-v0.o Really compare return types for function types 2014-04-05 12:42:24 +02:00
test5-v1.cc Really compare return types for function types 2014-04-05 12:42:24 +02:00
test5-v1.o Really compare return types for function types 2014-04-05 12:42:24 +02:00
test6-report.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test6-v0.cc Represent a removed+added data member at a given offset as changed 2014-04-11 21:55:08 +02:00
test6-v0.o Represent a removed+added data member at a given offset as changed 2014-04-11 21:55:08 +02:00
test6-v1.cc Represent a removed+added data member at a given offset as changed 2014-04-11 21:55:08 +02:00
test6-v1.o Represent a removed+added data member at a given offset as changed 2014-04-11 21:55:08 +02:00
test7-report.txt Apply suppression specifications to added and removed functions and variables 2015-06-24 12:09:53 +02:00
test7-v0.cc Really detect static-ness of data members. Oops. 2014-04-16 17:31:13 +02:00
test7-v0.o Drop symbols not global in a symtab from corpus symtab 2014-04-21 21:32:39 +02:00
test7-v1.cc Drop symbols not global in a symtab from corpus symtab 2014-04-21 21:32:39 +02:00
test7-v1.o Drop symbols not global in a symtab from corpus symtab 2014-04-21 21:32:39 +02:00
test8-report.txt Apply suppression specifications to added and removed functions and variables 2015-06-24 12:09:53 +02:00
test8-v0.cc Drop symbols not global in a symtab from corpus symtab 2014-04-21 21:32:39 +02:00
test8-v0.o Drop symbols not global in a symtab from corpus symtab 2014-04-21 21:32:39 +02:00
test8-v1.cc Drop symbols not global in a symtab from corpus symtab 2014-04-21 21:32:39 +02:00
test8-v1.o Drop symbols not global in a symtab from corpus symtab 2014-04-21 21:32:39 +02:00
test9-report.txt Apply suppression specifications to added and removed functions and variables 2015-06-24 12:09:53 +02:00
test9-v0.cc Support TLS variables 2014-08-19 13:50:23 +02:00
test9-v1.cc Support TLS variables 2014-08-19 13:50:23 +02:00
test10-report.txt Adjust some tests for output changes 2015-07-09 00:10:33 +02:00
test10-v0.cc Support C and C++ array type. 2014-08-22 13:07:41 +02:00
test10-v0.o Support C and C++ array type. 2014-08-22 13:07:41 +02:00
test10-v1.cc Support C and C++ array type. 2014-08-22 13:07:41 +02:00
test10-v1.o Support C and C++ array type. 2014-08-22 13:07:41 +02:00
test11-report.txt Adjust some tests for output changes 2015-07-09 00:10:33 +02:00
test11-v0.cc Support C and C++ array type. 2014-08-22 13:07:41 +02:00
test11-v0.o Support C and C++ array type. 2014-08-22 13:07:41 +02:00
test11-v1.cc Support C and C++ array type. 2014-08-22 13:07:41 +02:00
test11-v1.o Support C and C++ array type. 2014-08-22 13:07:41 +02:00
test12-report.txt Consider default symbol versions when computing added/removed fns/vars 2015-07-24 14:04:11 +02:00
test12-v0.c Take symbol versions in account when computing added/removed decls 2014-08-25 23:16:50 +02:00
test12-v1.c Take symbol versions in account when computing added/removed decls 2014-08-25 23:16:50 +02:00
test12-version-script Take symbol versions in account when computing added/removed decls 2014-08-25 23:16:50 +02:00
test13-report.txt Adjust some tests for output changes 2015-07-09 00:10:33 +02:00
test13-v0.cc Sort reported changed data members by increasing offset 2014-09-03 09:59:03 +02:00
test13-v0.o Sort reported changed data members by increasing offset 2014-09-03 09:59:03 +02:00
test13-v1.cc Sort reported changed data members by increasing offset 2014-09-03 09:59:03 +02:00
test13-v1.o Sort reported changed data members by increasing offset 2014-09-03 09:59:03 +02:00
test14-inline-report.txt Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +02:00
test14-inline-v0.cc Better support for inline related diffs 2014-09-16 15:10:41 +02:00
test14-inline-v0.o Better support for inline related diffs 2014-09-16 15:10:41 +02:00
test14-inline-v1.cc Better support for inline related diffs 2014-09-16 15:10:41 +02:00
test14-inline-v1.o Better support for inline related diffs 2014-09-16 15:10:41 +02:00
test15-enum-report.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test15-enum-v0.cc Better support for enum diffs 2014-09-16 14:02:27 +02:00
test15-enum-v0.o Better support for enum diffs 2014-09-16 14:02:27 +02:00
test15-enum-v1.cc Better support for enum diffs 2014-09-16 14:02:27 +02:00
test15-enum-v1.o Better support for enum diffs 2014-09-16 14:02:27 +02:00
test16-syms-only-report.txt Apply suppression specifications to added and removed functions and variables 2015-06-24 12:09:53 +02:00
test16-syms-only-v0.cc Misc typo fixes 2015-06-24 12:12:47 +02:00
test16-syms-only-v0.o Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +02:00
test16-syms-only-v1.cc Misc typo fixes 2015-06-24 12:12:47 +02:00
test16-syms-only-v1.o Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +02:00
test17-non-refed-syms-report-0.txt Apply suppression specifications to added and removed functions and variables 2015-06-24 12:09:53 +02:00
test17-non-refed-syms-v0.cc Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +02:00
test17-non-refed-syms-v0.o Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +02:00
test17-non-refed-syms-v1.cc Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +02:00
test17-non-refed-syms-v1.o Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +02:00
test18-alias-sym-report-0.txt Apply suppression specifications to added and removed functions and variables 2015-06-24 12:09:53 +02:00
test18-alias-sym-v0.cc Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +02:00
test18-alias-sym-v1.cc Separate alias targets with a comma 2014-10-29 22:56:08 +01:00
test18-alias-sym-version-script Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +02:00
test19-soname-report-0.txt Apply suppression specifications to added and removed functions and variables 2015-06-24 12:09:53 +02:00
test19-soname-v0.cc Support reading and comparing soname from ELF files 2014-12-07 23:42:26 +01:00
test19-soname-v1.cc Support reading and comparing soname from ELF files 2014-12-07 23:42:26 +01:00
test20-add-fn-parm-report-0.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test20-add-fn-parm-v0.c Fix classification of parameter addition in C 2014-12-09 13:10:58 +01:00
test20-add-fn-parm-v1.c Fix classification of parameter addition in C 2014-12-09 13:10:58 +01:00
test21-redundant-fn-report-0.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test21-redundant-fn-v0.cc Un-share diff nodes in the comparison IR 2014-12-26 18:45:06 +01:00
test21-redundant-fn-v1.cc Un-share diff nodes in the comparison IR 2014-12-26 18:45:06 +01:00
test22-changed-parm-c-report-0.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test22-changed-parm-c-v0.c Un-share diff nodes in the comparison IR 2014-12-26 18:45:06 +01:00
test22-changed-parm-c-v1.c Un-share diff nodes in the comparison IR 2014-12-26 18:45:06 +01:00
test24-added-fn-parms-report-0.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test24-added-fn-parms-v0.c 18252 - Added parameters are not properly sorted 2015-04-15 15:21:56 +02:00
test24-added-fn-parms-v1.c 18252 - Added parameters are not properly sorted 2015-04-15 15:21:56 +02:00
test25-removed-fn-parms-report-0.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test25-removed-fn-parms-v0.c 18252 - Added parameters are not properly sorted 2015-04-15 15:21:56 +02:00
test25-removed-fn-parms-v1.c 18252 - Added parameters are not properly sorted 2015-04-15 15:21:56 +02:00
test26-added-parms-before-variadic-report.txt Make indexes of function parameters start at 1 2015-05-24 23:33:49 +02:00
test26-added-parms-before-variadic-v0.c Bug 18342 - Segmentation fault while comparing functions with variadic parameters 2015-05-05 10:45:06 +02:00
test26-added-parms-before-variadic-v1.c Bug 18342 - Segmentation fault while comparing functions with variadic parameters 2015-05-05 10:45:06 +02:00
test27-local-base-diff-report.txt Fix detection of local changes in base classes 2015-06-02 12:34:02 +02:00
test27-local-base-diff-v0.cc Fix detection of local changes in base classes 2015-06-02 12:34:02 +02:00
test27-local-base-diff-v0.o Fix detection of local changes in base classes 2015-06-02 12:34:02 +02:00
test27-local-base-diff-v1.cc Fix detection of local changes in base classes 2015-06-02 12:34:02 +02:00
test27-local-base-diff-v1.o Fix detection of local changes in base classes 2015-06-02 12:34:02 +02:00
test28-vtable-changes-report-0.txt Apply suppression specifications to added and removed functions and variables 2015-06-24 12:09:53 +02:00
test28-vtable-changes-v0.cc Report vtable changes in top-level function change reports 2015-06-04 13:30:16 +02:00
test28-vtable-changes-v0.o Report vtable changes in top-level function change reports 2015-06-04 13:30:16 +02:00
test28-vtable-changes-v1.cc Report vtable changes in top-level function change reports 2015-06-04 13:30:16 +02:00
test28-vtable-changes-v1.o Report vtable changes in top-level function change reports 2015-06-04 13:30:16 +02:00
test-23-diff-arch-report-0.txt Type read from DWARF don't have alignment information 2015-05-24 17:16:41 +02:00
test-23-diff-arch-v0.cc Detect and report changes in ELF architecture 2015-01-07 17:52:10 +01:00