[Bug default/28976] Optionally ignore SONAME when comparing libraries

woodard at redhat dot com sourceware-bugzilla@sourceware.org
Mon Mar 21 19:21:19 GMT 2022


https://sourceware.org/bugzilla/show_bug.cgi?id=28976

--- Comment #3 from Ben Woodard <woodard at redhat dot com> ---
(In reply to Matthias Maennich from comment #2)
> The hunk
> 
> +  if(ctxt->show_soname_change())
> +    r->priv_->sonames_equal_ = f->get_soname() == s->get_soname();
> +  else
> +    r->priv_->sonames_equal_ = true;
> 
> can be written as
> 
> + r->priv_->sonames_equal_ = ! ctxt->show_soname_change() 
>                             || f->get_soname() == s->get_soname();

That is clever. It might just be me but I find my version easier to read and I
doubt with optimization that the resulting machine code is going to be much
different. We should only be passing through this code once per execution and
so even if it isn't -- oh well.

I also considered:

r->priv_->sonames_equal_ = ctxt->show_soname_change() ? f->get_soname() ==
s->get_soname() : true;

and yours is a more compact form of that.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Libabigail mailing list