Commit 1066c5a7 authored by Anton Protopopov's avatar Anton Protopopov Committed by Greg Kroah-Hartman
Browse files

libbpf: Use proper errno value in linker



[ Upstream commit 358b1c0f ]

Return values of the linker_append_sec_data() and the
linker_append_elf_relos() functions are propagated all the
way up to users of libbpf API. In some error cases these
functions return -1 which will be seen as -EPERM from user's
point of view. Instead, return a more reasonable -EINVAL.

Fixes: faf6ed32 ("libbpf: Add BPF static linker APIs")
Signed-off-by: default avatarAnton Protopopov <a.s.protopopov@gmail.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250430120820.2262053-1-a.s.protopopov@gmail.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 1c005c53
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment