libbpf/backport-libbpf-Modify-the-function-name-in-libbpf.c-to-match.patch
jinzhiguang 08820d98cf backport patche from upstream
backport-libbpf-Modify-the-function-name-in-libbpf.c-to-match.patch

Signed-off-by: jinzhiguang <jinzhiguang@kylinos.cn>
(cherry picked from commit 9fe1f73b4e8927a170f95284d0d16b5369f2cde0)
2024-05-08 14:53:50 +08:00

31 lines
1.1 KiB
Diff

From e399146fd1e0fd033be8d54da0bf7b621d5379a6 Mon Sep 17 00:00:00 2001
From: jinzhiguang <jinzhiguang@kylinos.cn>
Date: Wed, 3 Apr 2024 17:07:36 +0800
Subject: [PATCH 1/3] libbpf: Modify the function name in libbpf.c, to match
the symbols in the libbpf.map file
Change the function name bpf_object__pin_instance to bpf_program__pin_instance,
so that the symbol can be found in the .so file.
Signed-off-by: jinzhiguang <jinzhiguang@kylinos.cn>
---
src/libbpf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libbpf.c b/src/libbpf.c
index ef7f302..4df5147 100644
--- a/src/libbpf.c
+++ b/src/libbpf.c
@@ -8047,7 +8047,7 @@ static int bpf_program_unpin_instance(struct bpf_program *prog, const char *path
}
__attribute__((alias("bpf_program_pin_instance")))
-int bpf_object__pin_instance(struct bpf_program *prog, const char *path, int instance);
+int bpf_program__pin_instance(struct bpf_program *prog, const char *path, int instance);
__attribute__((alias("bpf_program_unpin_instance")))
int bpf_program__unpin_instance(struct bpf_program *prog, const char *path, int instance);
--
2.27.0