mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-15 14:34:38 +00:00
ddad560153
The DWARF reader is no longer the only ELF-based reader in libabigail: the CTF reader also operates on ELF files. Other ELF-based formats (such as BTF) may also join in the future. These readers share a lot of similarities: they all operate on object files, they fetch debugging information from certain sections, they rely on the symtab of the read object, the debugging info may be in a separated file (for certain formats) and so on. It follows that a lot of logic can be shared among all the ELF-based readers. This patch is oriented to that direction. A new namespace, abigail::elf_reader, is introduced with the goal of holding features and definitions useful for any ELF-based abigail reader. Then all the definitions related to the status resulting from extracting a corpus from an object file (the dwarf_reader::status) are moved to abigail::elf_reader. The utilities and tests are adjusted accordingly. Signed-off-by: Jose E. Marchesi <jose.marchesi@oracle.com> * include/abg-reader-common.h: New file. * include/abg-dwarf-reader.h (enum status): Move to abg-reader-status.h. (status_to_diagnostic_string): Likewise. (operator|): Likewise. (operator&): Likewise. (operator|=): Likewise. (operator&=): Likewise. Include abg-reader-common.h. * include/Makefile.am (pkginclude_HEADERS): Add abg-elf-reader-common.h. * src/abg-elf-reader-status.cc: New file. * src/abg-dwarf-reader.cc (operator|): Move to abg-elf-reader-common.cc. (operator&): Likewise. (operator|): Likewise. (operator|=): Likewise. (operator&=): Likewise. (status_to_diagnostic_string): Likewise. * src/Makefile.am (libabigail_la_SOURCES): Add elf-reader-common.cc. * src/abg-tools-utils.cc: Use abigail::elf_reader instead of abigail::dwarf_reader for the status definitions. * tools/abicompat.cc: Likewise. * tools/abidiff.cc: Likewise. * tools/abidw.cc: Likewise. * tools/abilint.cc: Likewise. * tools/abipkgdiff.cc: Likewise. * tests/print-diff-tree.cc: Likewise. * tests/test-diff-dwarf.cc: Likewise. * tests/test-read-dwarf.cc: Likewise. * tests/test-symtab.cc: Likewise. * tests/test-ir-walker.cc: Likewise. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
36 lines
649 B
Makefile
36 lines
649 B
Makefile
## SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
pkginclude_HEADERS = \
|
|
abg-sptr-utils.h \
|
|
abg-interned-str.h \
|
|
abg-ir.h \
|
|
abg-corpus.h \
|
|
abg-reader.h \
|
|
abg-elf-reader-common.h \
|
|
abg-dwarf-reader.h \
|
|
abg-writer.h \
|
|
abg-comparison.h \
|
|
abg-reporter.h \
|
|
abg-suppression.h \
|
|
abg-comp-filter.h \
|
|
abg-diff-utils.h \
|
|
abg-libxml-utils.h \
|
|
abg-fwd.h \
|
|
abg-hash.h \
|
|
abg-tools-utils.h \
|
|
abg-config.h \
|
|
abg-ini.h \
|
|
abg-workers.h \
|
|
abg-traverse.h \
|
|
abg-cxx-compat.h \
|
|
abg-version.h \
|
|
abg-viz-common.h \
|
|
abg-viz-dot.h \
|
|
abg-viz-svg.h \
|
|
abg-regex.h
|
|
|
|
if CTF_READER
|
|
pkginclude_HEADERS += abg-ctf-reader.h
|
|
endif
|
|
|
|
EXTRA_DIST = abg-version.h.in
|