Re: [PATCH dwarves 2/4] btf_encoder: Refactor elf_functions__new() with struct btf_encoder as argument
Alan Maguire <[email protected]>
| Newsgroups | org.kernel.vger.dwarves,org.kernel.vger.bpf |
|---|---|
| Message-ID | <[email protected]> |
On 13/01/2026 18:32, Ihor Solodrai wrote: > On 1/13/26 5:13 AM, Alan Maguire wrote: >> From: Yonghong Song <[email protected]> >> >> For elf_functions__new(), replace original argument 'Elf *elf' with >> 'struct btf_encoder *encoder' for future use. >> >> Signed-off-by: Yonghong Song <[email protected]> >> --- >> btf_encoder.c | 6 ++++-- >> 1 file changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/btf_encoder.c b/btf_encoder.c >> index 2c3cef9..5bc61cb 100644 >> --- a/btf_encoder.c >> +++ b/btf_encoder.c >> @@ -187,11 +187,13 @@ static inline void elf_functions__delete(struct elf_functions *funcs) >> >> static int elf_functions__collect(struct elf_functions *functions); >> >> -struct elf_functions *elf_functions__new(Elf *elf) >> +struct elf_functions *elf_functions__new(struct btf_encoder *encoder) > > Hi Alan, Yonghong, > > I assume "future use" refers to this patch: > https://lore.kernel.org/dwarves/[email protected]/ > > Do I understand correctly that you're passing btf_encoder here in > order to detect that the `encoder->dotted_true_signature` feature flag > is set? If so, I think this is a bit of an overkill. > hi Ihor, good catch; actually I think it makes sense to drop this patch until we need it. At one point I was using the encoder in this series but it's not needed right now, so let's wait and see if/when we need it later. Thanks! Alan