abg-elf-helpers: move some elf helpers from abg-dwarf-reader
Move some definitions from abg-dwarf-reader to abg-elf-helpers that are
strictly only related to ELF.
* abg-dwarf-reader.cc (stt_to_elf_symbol_type): Move function out.
(stb_to_elf_symbol_binding): Likewise.
(stv_to_elf_symbol_visibility): Likewise.
(e_machine_to_string): Likewise.
(find_section): Likewise.
(find_symbol_table_section): Likewise.
(find_symbol_table_section_index): Likewise.
(enum hash_table_kind): Likewise.
(find_hash_table_section_index): Likewise.
(get_symbol_versionning_sections): Likewise.
(find_text_section): Likewise.
(find_bss_section): Likewise.
(find_rodata_section): Likewise.
(find_data_section): Likewise.
(find_data1_section): Likewise.
* abg-elf-helpers.cc (stt_to_elf_symbol_type): Move function in.
(stb_to_elf_symbol_binding): Likewise.
(stv_to_elf_symbol_visibility): Likewise.
(e_machine_to_string): Likewise.
(find_section): Likewise.
(find_symbol_table_section): Likewise.
(find_symbol_table_section_index): Likewise.
(enum hash_table_kind): Likewise.
(find_hash_table_section_index): Likewise.
(get_symbol_versionning_sections): Likewise.
(find_text_section): Likewise.
(find_bss_section): Likewise.
(find_rodata_section): Likewise.
(find_data_section): Likewise.
(find_data1_section): Likewise.
* abg-elf-helpers.h (stt_to_elf_symbol_type): Add declaration.
(stb_to_elf_symbol_binding): Likewise.
(stv_to_elf_symbol_visibility): Likewise.
(e_machine_to_string): Likewise.
(find_section): Likewise.
(find_symbol_table_section): Likewise.
(find_symbol_table_section_index): Likewise.
(enum hash_table_kind): Likewise.
(find_hash_table_section_index): Likewise.
(get_symbol_versionning_sections): Likewise.
(find_text_section): Likewise.
(find_bss_section): Likewise.
(find_rodata_section): Likewise.
(find_data_section): Likewise.
(find_data1_section): Likewise.
Reviewed-by: Giuliano Procida <gprocida@google.com>
Signed-off-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
3 files changed