[PATCH 2/4] gas: Add support for LLVM addrsig and addrsig_sym directives on ELF.
Alan Modra
amodra@gmail.com
Wed May 25 07:23:49 GMT 2022
On Wed, May 25, 2022 at 03:42:50PM +0900, Tatsuyuki Ishi via Binutils wrote:
> + for (symtab_index = 0, symp = symbol_rootP; symp; symp = symbol_next (symp))
> + {
> + if (S_GET_ADDRSIG (symp))
> + len += out_uleb128 (symtab_index);
> + if (symbol_written_p (symp))
> + symtab_index++;
> + }
This looks odd, seemingly allowing multiple uleb output for the same
index. Wouldn't the following be better?
if (symbol_written_p (symp))
{
if (S_GET_ADDRSIG (symp))
len += out_uleb128 (symtab_index);
symtab_index++;
}
> +bool
> +S_GET_ADDRSIG (symbolS *s)
> +{
> + if (s->flags.local_symbol)
> + abort();
"return false" rather than "abort()" please.
> + return s->flags.addr_sig;
> +}
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list