On Fri, Aug 16, 2024 at 2:39 AM Sami Tolvanen <[email protected]> wrote:
>
> The compiler may choose not to emit type information in DWARF for all
> aliases, but it's possible for each alias to be exported separately.
> To ensure we find type information for the aliases as well, read
> {section, address} tuples from the symbol table and match symbols also
> by address.
>
> Signed-off-by: Sami Tolvanen <[email protected]>
> ---
> +
> +static int set_symbol_addr(struct symbol *sym, void *arg)
> +{
> + struct symbol_addr *addr = arg;
> +
> + if (sym->addr.section == SHN_UNDEF) {
> + sym->addr.section = addr->section;
> + sym->addr.address = addr->address;
These two lines can be replaced with
sym->addr = *addr;
--
Best Regards
Masahiro Yamada