Re: [PATCH 01/11] bpf: Add btfid tool to resolve BTF IDs in ELF object

2020-06-22 Thread Jiri Olsa
On Fri, Jun 19, 2020 at 11:12:29AM -0700, Andrii Nakryiko wrote: SNIP > > > > ok > > > > > > > > > + root = &obj->funcs; > > > > + nr = &nr_funcs; > > > > + } else if (BTF_INFO_KIND(type->info) == BTF_KIND_STRUCT > > > > && nr_structs) {

Re: [PATCH 01/11] bpf: Add btfid tool to resolve BTF IDs in ELF object

2020-06-19 Thread Andrii Nakryiko
On Fri, Jun 19, 2020 at 6:04 AM Jiri Olsa wrote: > > On Thu, Jun 18, 2020 at 05:38:03PM -0700, Andrii Nakryiko wrote: > > On Tue, Jun 16, 2020 at 3:06 AM Jiri Olsa wrote: > > > > > > The btfid tool scans Elf object for .BTF_ids section and > > > resolves its symbols with BTF IDs. > > > > naming i

Re: [PATCH 01/11] bpf: Add btfid tool to resolve BTF IDs in ELF object

2020-06-19 Thread Jiri Olsa
On Thu, Jun 18, 2020 at 05:38:03PM -0700, Andrii Nakryiko wrote: > On Tue, Jun 16, 2020 at 3:06 AM Jiri Olsa wrote: > > > > The btfid tool scans Elf object for .BTF_ids section and > > resolves its symbols with BTF IDs. > > naming is hard and subjective, I know. But given this actively > modifies

Re: [PATCH 01/11] bpf: Add btfid tool to resolve BTF IDs in ELF object

2020-06-18 Thread Andrii Nakryiko
On Tue, Jun 16, 2020 at 3:06 AM Jiri Olsa wrote: > > The btfid tool scans Elf object for .BTF_ids section and > resolves its symbols with BTF IDs. naming is hard and subjective, I know. But given this actively modifies ELF file it probably should indicate this in the name. So something like patch

[PATCH 01/11] bpf: Add btfid tool to resolve BTF IDs in ELF object

2020-06-16 Thread Jiri Olsa
The btfid tool scans Elf object for .BTF_ids section and resolves its symbols with BTF IDs. It will be used to during linking time to resolve arrays of BTF IDs used in verifier, so these IDs do not need to be resolved in runtime. The expected layout of .BTF_ids section is described in btfid.c hea