mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-16 15:04:46 +00:00
The Git repository of the Libabigail Project
d71d76db21
The libctf call ctf_open is not reentrant. This is because it uses bfd_open (and other BFD calls) internally in order to fetch the different bits of CTF from the ELF file. This is unfortunate, as it makes libabigail::ctf_reader::read_corpus non-reentrant. We detected this problem thanks to one of the libabigail test driver, that exercises tests in parallel using threads. Fortunately libctf provides an alternate way to decode CTF data, that involves the user to provide the raw contents of the relevant ELF sections (.ctf, the symtab, the string table) to ctf_arc_bufopen call. This patch changes the CTF reader in libabigail to use this mechanism. libelf is used in order to extract the contents of these sections. * src/abg-ctf-reader.cc (class read_context): New attributes elf_handler, elf_fd, ctf_sect, symtab_sec and strtab_sect. (read_context): Do not read the CTF archive here. (slurp_elf_info): Adjust to use attributes instead of locals, and fetch the raw ELF section contents for libctf. (close_elf_handler): New function. (fill_ctf_section): Likewise. (read_corpus): Call open_elf_handler, close_elf_handler and build the CTF archive using ctf_arc_bufopen instead of ctf_open. Signed-by: Jose E. Marchesi <jose.marchesi@oracle.com> Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
autoconf-archive | ||
bash-completion | ||
doc | ||
include | ||
m4 | ||
relicensing-scripts | ||
scripts | ||
src | ||
tests | ||
tools | ||
.clang-format | ||
.gitignore | ||
abigail.m4 | ||
AUTHORS | ||
ChangeLog | ||
COMMIT-LOG-GUIDELINES | ||
COMPILING | ||
configure.ac | ||
CONTRIBUTING | ||
default.abignore | ||
gen-changelog.py | ||
install-sh | ||
libabigail.pc.in | ||
license-change-2020.txt | ||
LICENSE.txt | ||
ltmain.sh | ||
Makefile.am | ||
NEWS | ||
README | ||
release-text-template.txt | ||
update-copyright.sh | ||
VISIBILITY |
This is the Application Binary Interface Generic Analysis and Instrumentation Library. It aims at constructing, manipulating, serializing and de-serializing ABI-relevant artifacts. The set of artifacts that we are intersted is made of quantities like types, variable, fonctions and declarations of a given library or program. For a given library or program this set of quantities is called an ABI corpus. This library aims at (among other things) providing a way to compare two ABI Corpora (apparently the plural of corpus is copora, heh, that's cool), provide detailed information about their differences, and help build tools to infer interesting conclusions about these differences. You are welcome to contribute to this project after reading the files CONTRIBUTING and COMMIT-LOG-GUIDELINES files in the source tree. Communicating with the maintainers of this project -- including sending patches to be include to the source code -- happens via email at libabigail@sourceware.org.