gas: set_symtab()'s setting of BSF_KEEP

Jan Beulich jbeulich@suse.com
Wed May 4 08:54:25 GMT 2022


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



More information about the Binutils mailing list