Re: [PAHOLE v4 1/3] dwarf_loader: Extract die__add_btf_type_tag() helper [NFC]

Yonghong Song <[email protected]> Wed, 3 Jun 2026 13:18:21 -0700
Newsgroups org.kernel.vger.dwarves,org.kernel.vger.bpf
Message-ID <[email protected]>

On 6/2/26 12:55 PM, Vineet Gupta wrote:
> NFC change preparing for DW_TAG_GNU_annotation support.
> Extract the btf_type_tag annotation creation logic into helper
> die__add_btf_type_tag().
>
> Signed-off-by: Vineet Gupta <[email protected]>

Acked-by: Yonghong Song <[email protected]>

> ---
> Changes since v3 [3]
>   - Fix comment to kernel style [Arnaldo]
>
> Changes since v2 [2]
>   - die__add_btf_type_tag() returns pointer not error code [Alan]
>
> Changes since v1 [1]
>   - NFC reinstate some original comments
>
> [3] https://lore.kernel.org/bpf/[email protected]/
> [2] https://lore.kernel.org/bpf/[email protected]/
> [1] https://lore.kernel.org/bpf/[email protected]/

If there is a further revision, for a three patch series, I think it is worthwhile
to have a cover letter so the above change log (and 2nd patch or more)
can be all in cover letter.

> ---
>   dwarf_loader.c | 58 +++++++++++++++++++++++++++++---------------------
>   1 file changed, 34 insertions(+), 24 deletions(-)
>
> diff --git a/dwarf_loader.c b/dwarf_loader.c
> index 16fb7becffee..42a0f3f74ce3 100644
> --- a/dwarf_loader.c
> +++ b/dwarf_loader.c
> @@ -1600,14 +1600,44 @@ static struct btf_type_tag_type *die__create_new_btf_type_tag_type(Dwarf_Die *di
>   	return tag;
>   }
>   
>
[...]