libabigail/tests/data/test-read-dwarf/test6.so.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

37 lines
3.0 KiB
Plaintext

<abi-corpus path='data/test-read-dwarf/test6.so'>
<elf-function-symbols>
<elf-symbol name='_Z3barv' type='func-type' binding='global-binding' is-defined='yes'/>
<elf-symbol name='_Z4blehv' type='func-type' binding='global-binding' is-defined='yes'/>
<elf-symbol name='_ZN1B3fooEv' type='func-type' binding='weak-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-function-symbols>
<elf-variable-symbols>
<elf-symbol name='_ZN1CIiE3barE' type='object-type' binding='gnu-unique-binding' is-defined='yes'/>
<elf-symbol name='_ZZN1B3fooEvE1a' type='object-type' binding='gnu-unique-binding' is-defined='yes'/>
</elf-variable-symbols>
<abi-instr version='1.0' address-size='64' path='test6.cc'>
<class-decl name='B' size-in-bits='8' is-struct='yes' visibility='default' filepath='/home/skumari/Tasks/source_repo/dodji/libabigail/tests/data/test-read-dwarf/test6.cc' line='9' column='1' id='type-id-1'>
<member-function access='public'>
<function-decl name='foo' mangled-name='_ZN1B3fooEv' filepath='/home/skumari/Tasks/source_repo/dodji/libabigail/tests/data/test-read-dwarf/test6.cc' line='11' column='1' visibility='default' binding='global' size-in-bits='64' alignment-in-bits='64' elf-symbol-id='_ZN1B3fooEv'>
<parameter type-id='type-id-2' is-artificial='yes'/>
<return type-id='type-id-3'/>
</function-decl>
</member-function>
</class-decl>
<type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-3'/>
<pointer-type-def type-id='type-id-1' size-in-bits='64' alignment-in-bits='64' id='type-id-2'/>
<function-decl name='bar' mangled-name='_Z3barv' filepath='/home/skumari/Tasks/source_repo/dodji/libabigail/tests/data/test-read-dwarf/test6.cc' line='19' column='1' visibility='default' binding='global' size-in-bits='64' alignment-in-bits='64' elf-symbol-id='_Z3barv'>
<return type-id='type-id-3'/>
</function-decl>
<function-decl name='bleh' mangled-name='_Z4blehv' filepath='/home/skumari/Tasks/source_repo/dodji/libabigail/tests/data/test-read-dwarf/test6.cc' line='34' column='1' visibility='default' binding='global' size-in-bits='64' alignment-in-bits='64' elf-symbol-id='_Z4blehv'>
<return type-id='type-id-3'/>
</function-decl>
<class-decl name='C&lt;int&gt;' size-in-bits='8' is-struct='yes' visibility='default' filepath='/home/skumari/Tasks/source_repo/dodji/libabigail/tests/data/test-read-dwarf/test6.cc' line='26' column='1' id='type-id-4'>
<data-member access='public' static='yes'>
<var-decl name='bar' type-id='type-id-3' mangled-name='_ZN1CIiE3barE' visibility='default' filepath='/home/skumari/Tasks/source_repo/dodji/libabigail/tests/data/test-read-dwarf/test6.cc' line='31' column='1' elf-symbol-id='_ZN1CIiE3barE'/>
</data-member>
</class-decl>
</abi-instr>
</abi-corpus>