mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-17 23:44:35 +00:00
The Git repository of the Libabigail Project
11f5dbaab2
On powerpc 64 ELFv1, the address of a function is different from the address of the entry point of that function. The value of a en ELF symbol represents the address of the function, whereas the DW_AT_low_pc DWARF attribute of a function DIE points to the entry point address of the function. So to get the symbol a function's DW_AT_low_pc points to, one needs to get the address of the function *from* the address of its entry point. More precisely, on ppc64, the address of a function is the address of a function descriptor. The function descriptor is a set of three 64 bits addresses. The first element of the triplet is the function entry pointer address. So to get the symbol a given function entry point address belongs to, one must get to the function descriptor which contains said function entry point address. And function descriptors are in the ".opd" special section. Unfortunately, Libabigail's ELF/DWARF reader has no knowledge of all this. So it cannot get the symbol of a given function DWARF description. So it considers all functions as having no ELF symbols. So it shows no ABI change pertaining to function sub-types on ppc64. This patch makes Libabigail support function descriptors on ppc64 so it can detect changes on function sub-types there. * src/abg-dwarf-reader.cc (read_context::{opd_section_, fun_entry_addr_sym_map_}): New data members. (read_context::read_context): Initialize the new opd_section_ data member. (read_context::{find_opd_section, lookup_ppc64_elf_fn_entry_pointer_address, fun_entry_addr_sym_map_sptr, fun_entry_addr_sym_map, elf_architecture_is_ppc64, elf_architecture_is_big_endian}): New member functions. (read_context::lookup_elf_fn_symbol_from_address): Adjust to use the new read_context::fun_entry_addr_sym_map() function. (read_context::load_symbol_maps): Populate the function entry addresses -> symbol map, for ppc64 ELFv1. (read_context::load_elf_properties): Renamed read_context::load_remaining_elf_data into this. (read_corpus_from_elf): Load elf properties before trying to load elf symbols information. * tests/data/test-diff-filter/libtest32-struct-change-v0.so: New binary test input, compiled for ppc64le. * tests/data/test-diff-filter/libtest32-struct-change-v1.so: Likewise. * tests/data/test-diff-filter/test32-ppc64le-struct-change-report0.txt: New test reference output. * tests/data/test-diff-filter/test32-ppc64le-struct-change-v0.c: Source code of the new binary test input above. * tests/data/test-diff-filter/test32-ppc64le-struct-change-v1.c: Likewise. * tests/data/Makefile.am: Add the new test material above to source distribution. * tests/test-diff-filter.cc (in_out_spec): Make this test harness run over the new test input binaries above. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
bash-completion | ||
doc | ||
include | ||
m4 | ||
scripts | ||
src | ||
tests | ||
tools | ||
.gitignore | ||
abigail.m4 | ||
AUTHORS | ||
ChangeLog | ||
COMMIT-LOG-GUIDELINES | ||
COMPILING | ||
config.h.in | ||
configure.ac | ||
CONTRIBUTING | ||
COPYING | ||
COPYING-GPLV3 | ||
COPYING-LGPLV2 | ||
COPYING-LGPLV3 | ||
gen-changelog.py | ||
install-sh | ||
libabigail.pc.in | ||
ltmain.sh | ||
Makefile.am | ||
NEWS | ||
README | ||
release-text-template.txt |
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.