]> www.infradead.org Git - users/jedix/linux-maple.git/commit
libbpf: Pull file-opening logic up to top-level functions
authorAlastair Robertson <ajor@meta.com>
Wed, 11 Dec 2024 16:40:29 +0000 (08:40 -0800)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 12 Dec 2024 23:09:21 +0000 (15:09 -0800)
commitb641712925bfe89ff7217cc2d0b7a8e042df556b
tree9aec214619cebbe4a508e0f193e55e77178a7599
parentb9fee10a52c0999f6f1c7e1c0ea83869f3cd10ae
libbpf: Pull file-opening logic up to top-level functions

Move the filename arguments and file-descriptor handling from
init_output_elf() and linker_load_obj_file() and instead handle them
at the top-level in bpf_linker__new() and bpf_linker__add_file().

This will allow the inner functions to be shared with a new,
non-filename-based, API in the next commit.

Signed-off-by: Alastair Robertson <ajor@meta.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20241211164030.573042-2-ajor@meta.com
tools/lib/bpf/linker.c