]> sourceware.org Git - libabigail.git/commit
symtab-reader: Setup aliases before checking ppc64 opd function entries
authorMark Wielaard <mark@klomp.org>
Mon, 16 May 2022 08:53:55 +0000 (10:53 +0200)
committerDodji Seketeli <dodji@redhat.com>
Mon, 30 May 2022 08:31:32 +0000 (10:31 +0200)
commit815afe1de7565d1d874528100a1acae69ccdf938
tree647c1fd769852f73753a58eb9c9d3b12ad2fcec4
parent1ebd5ff0eb09e6fe78d45065d3bb9bb02468d37c
symtab-reader: Setup aliases before checking ppc64 opd function entries

The update_function_entry_address_symbol_map function checks whether
the given symbol is an alias of another symbol or a special ppc64
ELFv1 function entry symbol. This requires the symbol aliases to
already been setup. But the alias entries were only setup after
calling update_function_entry_address_symbol_map. Make sure that the
symbol aliases have been setup and only then call the special ppc64
update_function_entry_address_symbol_map function. But make sure the
arm32 function symbol entry address cleanup is done before checking
for aliases.

This patch renames symtab::get_symbol_value into
symtab::setup_symbol_lookup_tables to better reflect what it does.

It is in that function that the call to
update_function_entry_address_symbol_map is performed, the arm32
symbol address cleanup is done and the ppc64 ELFv1 function address
plumbing is done.

So arranging for update_function_entry_address_symbol_map to be called
after symbol aliases are setup for ppc64 is also done in that
function.  That way, symtab::load_ only have to call
symtab::setup_symbol_lookup_tables to have aliases setup.

This fixes runtestslowselfcompare.sh on ppc64 (ELFv1) with
ENABLE_SLOW_TEST=yes

* src/abg-elf-helpers.h (architecture_is_ppc32): Declare new
function.
* src/abg-elf-helpers.cc (architecture_is_ppc32): Define it.
* src/abg-symtab-reader.cc
(symtab::setup_symbol_lookup_tables): Rename
symtab::get_symbol_value into this. Setup symbol aliases before
setting up function entry address maps for ppc{32,64} ELFv1 and
after fixing up arm32/64 addresses.
(symtab::load_): Invoke the new setup_symbol_lookup_tables.
update_function_entry_address_symbol_map after setting up aliases.
No need to setup symbol aliases anymore.
(symtab::add_alternative_address_lookups): Invoke the new
setup_symbol_lookup_tables.

Signed-off-by: Mark Wielaard <mark@klomp.org>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-elf-helpers.cc
src/abg-elf-helpers.h
src/abg-symtab-reader.cc
src/abg-symtab-reader.h
This page took 0.033206 seconds and 5 git commands to generate.