libabigail/tests/data/test-read-dwarf/test0.abi
Dodji Seketeli 0dd5f64279 Sort elf symbols before serializing them
* include/abg-corpus.h (corpus::{get_sorted_fun_symbols,
	get_sorted_var_symbols}): Declare new member functions.
	* src/abg-corpus.cc (corpus_priv::{sorted_var_symbols,
	sorted_fun_symbols}): New data members.
	(struct elf_symbol_comp_functor): Define new comparison functor.
	(corpus::{get_sorted_fun_symbols, get_sorted_var_symbols}): Define
	new member functions.
	* src/abg-writer.cc (write_elf_symbols_table): Take a sorted
	vector of symbols in parameters, rather than an unsorted map.
	(write_corpus_to_native_xml): Write a sorted vector of symbols,
	rather than an unsorted map of symbols.
	* tests/data/test-read-dwarf/test0.abi: Adjust.
	* tests/data/test-read-dwarf/test1.abi: Likewise.
	* tests/data/test-read-dwarf/test2.so.abi: Likewise.
	* tests/data/test-read-dwarf/test3.so.abi: Likewise.
	* tests/data/test-read-dwarf/test6.so.abi: Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-11-08 11:22:43 +01:00

63 lines
5.2 KiB
Plaintext

<abi-corpus path='data/test-read-dwarf/test0'>
<elf-function-symbols>
<elf-symbol name='_ZN3ns03barEiz' type='func-type' binding='global-binding' is-defined='yes'/>
<elf-symbol name='_ZN3ns03bazERi' type='func-type' binding='global-binding' is-defined='yes'/>
<elf-symbol name='_ZN3ns03fooEPcl' type='func-type' binding='global-binding' is-defined='yes'/>
<elf-symbol name='_ZN3ns04bar2ERNS_1EE' type='func-type' binding='global-binding' is-defined='yes'/>
<elf-symbol name='_ZN3ns04baz2ERi' type='func-type' binding='global-binding' is-defined='yes'/>
<elf-symbol name='__libc_csu_fini' type='func-type' binding='global-binding' is-defined='yes'/>
<elf-symbol name='__libc_csu_init' type='func-type' binding='global-binding' is-defined='yes'/>
<elf-symbol name='_fini' type='func-type' binding='global-binding' is-defined='yes'/>
<elf-symbol name='_init' type='func-type' binding='global-binding' is-defined='yes'/>
<elf-symbol name='_start' type='func-type' binding='global-binding' is-defined='yes'/>
<elf-symbol name='main' type='func-type' binding='global-binding' is-defined='yes'/>
</elf-function-symbols>
<elf-variable-symbols>
<elf-symbol name='_IO_stdin_used' type='object-type' binding='global-binding' is-defined='yes'/>
<elf-symbol name='__TMC_END__' type='object-type' binding='global-binding' is-defined='yes'/>
<elf-symbol name='__dso_handle' type='object-type' binding='global-binding' is-defined='yes'/>
<elf-symbol name='global' type='object-type' binding='global-binding' is-defined='yes'/>
</elf-variable-symbols>
<abi-instr version='1.0' address-size='64' path='test0.cc'>
<namespace-decl name='ns0'>
<function-decl name='bar' mangled-name='_ZN3ns03barEiz' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test0.cc' line='12' column='1' visibility='default' binding='global' size-in-bits='64' alignment-in-bits='64' elf-symbol-id='_ZN3ns03barEiz'>
<parameter type-id='type-id-1'/>
<parameter is-variadic='yes'/>
</function-decl>
<function-decl name='baz' mangled-name='_ZN3ns03bazERi' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test0.cc' line='16' column='1' visibility='default' binding='global' size-in-bits='64' alignment-in-bits='64' elf-symbol-id='_ZN3ns03bazERi'>
<parameter type-id='type-id-2'/>
</function-decl>
<enum-decl name='E' id='type-id-3'>
<underlying-type type-id='type-id-4'/>
<enumerator name='e0' value='0'/>
<enumerator name='e1' value='1'/>
</enum-decl>
<function-decl name='bar2' mangled-name='_ZN3ns04bar2ERNS_1EE' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test0.cc' line='22' column='1' visibility='default' binding='global' size-in-bits='64' alignment-in-bits='64' elf-symbol-id='_ZN3ns04bar2ERNS_1EE'>
<parameter type-id='type-id-5'/>
</function-decl>
<typedef-decl name='long_long' type-id='type-id-6' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test0.cc' line='25' column='1' id='type-id-7'/>
<function-decl name='baz2' mangled-name='_ZN3ns04baz2ERi' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test0.cc' line='28' column='1' visibility='default' binding='global' size-in-bits='64' alignment-in-bits='64' elf-symbol-id='_ZN3ns04baz2ERi'>
<parameter type-id='type-id-2'/>
<return type-id='type-id-7'/>
</function-decl>
<function-decl name='foo' mangled-name='_ZN3ns03fooEPcl' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test0.cc' line='45' column='1' visibility='default' binding='global' size-in-bits='64' alignment-in-bits='64' elf-symbol-id='_ZN3ns03fooEPcl'>
<parameter type-id='type-id-8'/>
<parameter type-id='type-id-9'/>
<return type-id='type-id-9'/>
</function-decl>
</namespace-decl>
<type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-1'/>
<reference-type-def kind='lvalue' type-id='type-id-1' size-in-bits='64' alignment-in-bits='64' id='type-id-2'/>
<type-decl name='enum-E-underlying-type' size-in-bits='32' alignment-in-bits='32' id='type-id-4'/>
<reference-type-def kind='lvalue' type-id='type-id-3' size-in-bits='64' alignment-in-bits='64' id='type-id-5'/>
<type-decl name='long long int' size-in-bits='64' alignment-in-bits='64' id='type-id-6'/>
<type-decl name='long int' size-in-bits='64' alignment-in-bits='64' id='type-id-9'/>
<type-decl name='char' size-in-bits='8' alignment-in-bits='8' id='type-id-10'/>
<pointer-type-def type-id='type-id-10' size-in-bits='64' alignment-in-bits='64' id='type-id-8'/>
<function-decl name='main' mangled-name='main' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test0.cc' line='49' column='1' visibility='default' binding='global' size-in-bits='64' alignment-in-bits='64' elf-symbol-id='main'>
<return type-id='type-id-1'/>
</function-decl>
<var-decl name='global' type-id='type-id-1' mangled-name='global' visibility='default' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test0.cc' line='3' column='1' elf-symbol-id='global'/>
</abi-instr>
</abi-corpus>