mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-11 20:44:48 +00:00
897ecc9a49
This patch teaches the BTF reader how to construct an IR for undefined interfaces. The patch also updates the abicompat tool for BTF support. * doc/manuals/abicompat.rst: Update documentation for the --btf option of abicompat. * include/abg-elf-reader.h (elf::reader::{function,variable}_symbol_is_undefined): Declare new member functions. * src/abg-btf-reader.cc (reader::read_debug_info_into_corpus): Sort functions & variables after canonicalization. (reader::build_ir_node_from_btf_type): Always call fe_iface::add_{fn,var}_to_exported_or_undefined_decls with the decl that was constructed. (reader::build_function_decl): Support setting an undefined symbol to the function decl. (reader::build_var_decl): Likewise, support setting undefined symbol the variable decl. * src/abg-elf-reader.cc ((elf::reader::{function,variable}_symbol_is_undefined): Declare new member functions.): Define new member functions. * src/abg-symtab-reader.cc (symtab::{function,variable}_symbol_is_undefined): Return the undefined symbol that was found. * src/abg-symtab-reader.h (symtab::{function,variable}_symbol_is_undefined): Return an undefined symbol rather than just a boolean value. * tools/abicompat.cc: Add support for BTF here. (options::use_btf): Define new data member ... (options::options): ... and initialize it. (display_usage): Add a help string for the --btf option. (parse_command_line): Parse the --btf option. * tests/data/test-abicompat/test7-fn-changed-report-0.1.txt: New reference test output file. * tests/data/test-abicompat/test7-fn-changed-report-2.1.txt: Likewise. * tests/data/test-abicompat/libtest7-fn-changed-libapp-btf-v0.so: New binary input file. * tests/data/test-abicompat/libtest7-fn-changed-libapp-btf-v1.so: Likewise. * tests/data/test-abicompat/test7-fn-changed-app.btf: Likewise. * tests/data/Makefile.am: Add the new test material to source distribution. * tests/test-abicompat.cc (in_out_specs): Add the new test input to the test harness. * tests/data/test-abicompat/test7-fn-changed-app.c: Adjust. * tests/data/test-abicompat/test7-fn-changed-libapp-v0.c: Likewise. * tests/data/test-abicompat/test7-fn-changed-libapp-v1.c: Likewise Signed-off-by: Dodji Seketeli <dodji@redhat.com>
16 KiB
Executable File
16 KiB
Executable File