libabigail/tests/data/test-diff-dwarf
Dodji Seketeli 929db0a880 Detect and report changes in ELF architecture
Libabigail does not take in account the architecture of the ELF file
it reads.  This patch changes that to represent the ELF architecture
as a string, detect when that architecture changes accross two corpora
being compared and emit a report about that change.

	* configure.ac: Detect the presence of libebl.a and add it to the
	list of library we depend on to build libabigail.  Report when
	libelf.so is not found.
	* include/abg-comparison.h:
	(diff_context::show_architecture_change): Declare new accessors.
	(corpus_diff::architecture_changed): Declare new method.
	* include/abg-corpus.h (corpus::{get,set}_architecture_name):
	Declare new accessors.
	* src/abg-comparison.cc
	(diff_context::priv::show_architecture_change_): New data member.
	(diff_context::priv::priv): Initialize it.
	(diff_context::show_architecture_change): Define new accessors.
	(function_decl_diff::report): Report when the size/alignment of
	the function address changes.
	(corpus_diff::priv::architectures_equal_): New data member.
	(corpus_diff::priv::priv): Initialize it.
	(corpus_diff::priv::emit_diff_stats): Take in account changes of
	architecture.
	(corpus_diff::architecture_changed): Define new method.
	(corpus_diff::length): Take in account changes of architecture.
	(corpus_diff::report): Report about changes of architecture.
	(compute_diff): In the overload for corpus_diff_sptr, detect
	changes fo architecture.
	* src/abg-corpus.cc (corpus_priv::architecture_name): Define new
	data member.
	(corpus::{get,set}_architecture_name): Define new method.
	* src/abg-dwarf-reader.cc: Include elfutils/libebl.h to use
	ebl_openbackend() and ebl_backend_name()
	(read_context::elf_architecture_): Define new data member.
	(read_context::elf_architecture): Define new accessor.
	(read_context::{load_elf_architecture, load_remaining_elf_data}):
	Define new methods.
	(read_corpus_from_elf): Use ctxt.load_remaining_elf_data() in lieu
	of ctxt.load_dt_soname_and_needed.  Stick the architecture into
	the corpus.
	* src/abg-reader.cc (read_corpus_from_input): Read the
	'architecture' XML property.
	* src/abg-writer.cc (write_corpus_to_native_xml): Write the
	'architecture' XML property.
	* tests/data/test-diff-dwarf/libtest-23-diff-arch-v0-32.so: New
	test input file.
	* tests/data/test-diff-dwarf/libtest-23-diff-arch-v0-64.so:
	Likewise.
	* tests/data/test-diff-dwarf/test-23-diff-arch-report-0.txt:
	Likewise.
	* tests/data/test-diff-dwarf/test-23-diff-arch-v0.cc: Source code
	for the binary test input files above.
	* tests/data/Makefile.am: Add the new test input files to the
	source distribution.
	* tests/test-diff-dwarf.cc (in_out_specs): Add the new test input
	data to the set of input data to run this test harness over.
	* tests/test-read-dwarf.cc (main): Do not take the architecture in
	account during comparisons.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2015-01-07 17:52:10 +01: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
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 Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +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 Remove useless new line from comparison engine's report 2014-09-03 09:59:03 +02:00
test1-v0.cc Add forgotten source file for binary test input 2014-03-31 11:27:32 +02:00
test1-v0.o Fix var_diff length determination 2014-03-29 10:26:45 +01:00
test1-v1.cc Add forgotten source file for binary test input 2014-03-31 11:27:32 +02:00
test1-v1.o Fix var_diff length determination 2014-03-29 10:26:45 +01:00
test2-report.txt Make determining of compatible types complete 2014-12-10 08:02:32 +01:00
test2-v0.cc Compact & intuitive reporting for changed function parameters 2014-04-01 12:38:51 +02:00
test2-v0.o Compact & intuitive reporting for changed function parameters 2014-04-01 12:38:51 +02:00
test2-v1.cc Compact & intuitive reporting for changed function parameters 2014-04-01 12:38:51 +02:00
test2-v1.o Compact & intuitive reporting for changed function parameters 2014-04-01 12:38:51 +02:00
test3-report.txt Remove useless new line from comparison engine's report 2014-09-03 09:59:03 +02:00
test3-v0.cc Fix off-by one comparison bug in comparing function parameters 2014-04-04 11:39:41 +02:00
test3-v0.o Fix off-by one comparison bug in comparing function parameters 2014-04-04 11:39:41 +02:00
test3-v1.cc Fix off-by one comparison bug in comparing function parameters 2014-04-04 11:39:41 +02:00
test3-v1.o Fix off-by one comparison bug in comparing function parameters 2014-04-04 11:39:41 +02:00
test4-report.txt Make determining of compatible types complete 2014-12-10 08:02:32 +01:00
test4-v0.cc Categorize through compatible distinct type diffs 2014-04-05 12:24:25 +02:00
test4-v0.o Categorize through compatible distinct type diffs 2014-04-05 12:24:25 +02:00
test4-v1.cc Categorize through compatible distinct type diffs 2014-04-05 12:24:25 +02:00
test4-v1.o Categorize through compatible distinct type diffs 2014-04-05 12:24:25 +02:00
test5-report.txt Make determining of compatible types complete 2014-12-10 08:02:32 +01: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 Correctly write the name of a const reference type 2014-07-18 18:55:23 +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 Remove useless new line from comparison engine's report 2014-09-03 09:59:03 +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 Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +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 Spit and polish variables presentation in diff report 2014-11-01 12:15:14 +01: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 Support C and C++ array type. 2014-08-22 13:07:41 +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 Support C and C++ array type. 2014-08-22 13:07:41 +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 Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +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 Sort reported changed data members by increasing offset 2014-09-03 09:59:03 +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 Better support for enum diffs 2014-09-16 14:02:27 +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 Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +02:00
test16-syms-only-v0.cc Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +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 Support comparing symbols not referenced by debug info 2014-10-22 23:04:40 +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 Fixup messed up old runtestdiffdwarf input tests 2014-12-07 23:42:26 +01: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 Fixup messed up old runtestdiffdwarf input tests 2014-12-07 23:42:26 +01: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 Support reading and comparing soname from ELF files 2014-12-07 23:42:26 +01: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 Fix classification of parameter addition in C 2014-12-09 13:10:58 +01: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 Un-share diff nodes in the comparison IR 2014-12-26 18:45:06 +01: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 Un-share diff nodes in the comparison IR 2014-12-26 18:45:06 +01: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
test-23-diff-arch-report-0.txt Detect and report changes in ELF architecture 2015-01-07 17:52:10 +01:00
test-23-diff-arch-v0.cc Detect and report changes in ELF architecture 2015-01-07 17:52:10 +01:00