Re: [PATCH v2 03/19] gendwarfksyms: Add address matching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 16, 2024 at 2:39 AM Sami Tolvanen <samitolvanen@xxxxxxxxxx> 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 <samitolvanen@xxxxxxxxxx>
> ---

> +
> +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





[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux