mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-24 18:52:15 +00:00
335d8786b2
* abg-ir.h (string_to_elf_symbol_type, string_to_elf_symbol_binding): Declare new entry points. * src/abg-ir.cc (string_to_elf_symbol_type) (string_to_elf_symbol_binding): Define new entry points. * include/abg-libxml-utils.h (xml_char_sptr_to_string): Declare new entry points. * src/abg-libxml-utils.cc (xml_char_sptr_to_string): Define new entry points. * src/abg-reader.cc (read_elf_symbol_type) (read_elf_symbol_binding, build_elf_symbol): Define new static functions. (build_function_decl, build_var_decl): Use the new build_elf_symbol and set the symbol to the function. Flag the function as having a public symbol in the symbol table if the symbol is public. * src/abg-writer.cc (write_elf_symbol_type) (write_elf_symbol_binding, write_elf_symbol): Define new static functions. (write_var_decl, write_function_decl): Use the new write_elf_symbol to serialize the symbol for the decl. * tests/data/test-read-dwarf/test[01].abi: Adjust. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
52 lines
4.2 KiB
Plaintext
52 lines
4.2 KiB
Plaintext
<abi-corpus path='data/test-read-dwarf/test0'>
|
|
<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 name='_ZN3ns03barEiz' type='func-type' binding='global-binding' is-defined='yes'/>
|
|
<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 name='_ZN3ns03bazERi' type='func-type' binding='global-binding' is-defined='yes'/>
|
|
<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 name='_ZN3ns04bar2ERNS_1EE' type='func-type' binding='global-binding' is-defined='yes'/>
|
|
<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 name='_ZN3ns04baz2ERi' type='func-type' binding='global-binding' is-defined='yes'/>
|
|
<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 name='_ZN3ns03fooEPcl' type='func-type' binding='global-binding' is-defined='yes'/>
|
|
<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 name='main' type='func-type' binding='global-binding' is-defined='yes'/>
|
|
<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 name='global' type='object-type' binding='global-binding' is-defined='yes'/>
|
|
</var-decl>
|
|
</abi-instr>
|
|
</abi-corpus>
|