Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libbpf: do not resolve size on duplicate FUNCs #7791

Open
wants to merge 3 commits into
base: bpf-next_base
Choose a base branch
from

Conversation

hack3ric
Copy link

This is a test PR for running CI.

@hack3ric hack3ric force-pushed the libbpf-dup-extern-funcs-test-ci branch 3 times, most recently from 08666e5 to 0f38bbe Compare September 29, 2024 06:47
FUNCs do not have sizes, thus currently btf__resolve_size will fail
with -EINVAL. Add conditions so that we only update size when the BTF
object is not function or function prototype.

Signed-off-by: Eric Long <i@hack3r.moe>
@hack3ric hack3ric force-pushed the libbpf-dup-extern-funcs-test-ci branch from 0f38bbe to 816fd5d Compare September 29, 2024 09:04
…ons doesn't fail

Previously when multiple BPF object files referencing the same extern
function (usually kfunc) are statically linked using `bpftool gen
object`, libbpf tries to get the nonexistent size of BTF_KIND_FUNC_PROTO
and fails. This test ensures it is fixed.

Signed-off-by: Eric Long <i@hack3r.moe>
@hack3ric hack3ric force-pushed the libbpf-dup-extern-funcs-test-ci branch from 816fd5d to 3bc0bd7 Compare September 29, 2024 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant