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

From: Sami Tolvanen
Date: Wed Sep 04 2024 - 16:50:40 EST


Hi,

On Sun, Sep 1, 2024 at 11:11 AM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
>
> On Fri, Aug 16, 2024 at 2:39 AM Sami Tolvanen <samitolvanen@xxxxxxxxxx> wrote:
> >
> > +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;

Good point, I'll fix this in the next version.

Sami