From: Jan Beulich <jbeulich@suse.com>
To: Alan Modra <amodra@gmail.com>
Cc: Binutils <binutils@sourceware.org>
Subject: gas: set_symtab()'s setting of BSF_KEEP
Date: Wed, 4 May 2022 10:54:25 +0200 [thread overview]
Message-ID: <a63dfa54-33bb-993a-cba1-92860c674d80@suse.com> (raw)
Alan,
while looking into how to address an Arm64 regression I ended up
coming across this code, originating from commit 76d129399558. The
first thing that puzzled me was the != for checking BSF_SECTION_SYM.
Shouldn't this be a check of just the single bit? The other thing
looking slightly odd was the mix of || and !( && ). After
transforming the whole thing to
if (!(asympp[i]->flags & BSF_SECTION_SYM)
|| !bfd_is_const_section (asympp[i]->section)
|| asympp[i]->section->symbol != asympp[i])
asympp[i]->flags |= BSF_KEEP;
it then occurred to me that the last part of the condition ought
to be redundant with the combination of the first two. Or is there
a way for *ABS* to have more than a single symbol having
BSF_SECTION_SYM set on it?
Thanks for any further insight,
Jan
next reply other threads:[~2022-05-04 8:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-04 8:54 Jan Beulich [this message]
2022-05-04 9:36 ` Alan Modra
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=a63dfa54-33bb-993a-cba1-92860c674d80@suse.com \
--to=jbeulich@suse.com \
--cc=amodra@gmail.com \
--cc=binutils@sourceware.org \
/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).