public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Dodji Seketeli <dodji@seketeli.org>
Cc: gprocida@google.com, maennich@google.com, libabigail@sourceware.org
Subject: Re: [PATCH] symtab-reader: Setup aliases before checking ppc64 opd function entries
Date: Sat, 28 May 2022 01:05:18 +0200	[thread overview]
Message-ID: <YpFZLpMpyKlX0zqA@wildebeest.org> (raw)
In-Reply-To: <877d67szp8.fsf@seketeli.org>

Hi Dodji,

On Fri, May 27, 2022 at 06:33:07PM +0200, Dodji Seketeli wrote:
> I have added support for ppc32 as well, as outlined above.
> 
> Please find below the updated patch that I am proposing.
> 
> From 8d44b582529ccd02689043918ef3ec3dd85155bc Mon Sep 17 00:00:00 2001
> From: Mark Wielaard <mark@klomp.org>
> Date: Mon, 16 May 2022 10:53:55 +0200
> Subject: [PATCH] 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>

I read over it one more time and it all looks good to me.

Cheers,

Mark

  reply	other threads:[~2022-05-27 23:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16  9:43 Dodji Seketeli
2022-05-17  9:59 ` Mark Wielaard
2022-05-17 13:51   ` Giuliano Procida
2022-05-17 14:03     ` Mark Wielaard
2022-05-27 16:33   ` Dodji Seketeli
2022-05-27 23:05     ` Mark Wielaard [this message]
2022-05-30  8:44       ` Dodji Seketeli
  -- strict thread matches above, loose matches on Subject: below --
2022-05-01 22:16 Mark Wielaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YpFZLpMpyKlX0zqA@wildebeest.org \
    --to=mark@klomp.org \
    --cc=dodji@seketeli.org \
    --cc=gprocida@google.com \
    --cc=libabigail@sourceware.org \
    --cc=maennich@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).