> On Oct 14, 2021, at 1:56 PM, Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> wrote: > > This uses the bpf_kallsyms_lookup_name helper added in previous patches > to relocate typeless ksyms. The return value ENOENT can be ignored, and > the value written to 'res' can be directly stored to the insn, as it is > overwritten to 0 on lookup failure. For repeating symbols, we can simply > copy the previously populated bpf_insn. > > Also, we need to take care to not close fds for typeless ksym_desc, so > reuse the 'off' member's space to add a marker for typeless ksym and use > that to skip them in cleanup_relos. > > We add a emit_ksym_relo_log helper that avoids duplicating common > logging instructions between typeless and weak ksym (for future commit). > > Signed-off-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx> LGTM! Acked-by: Song Liu <songliubraving@xxxxxx>