[DTrace-devel] [PATCH 09/15 v2] Fix references to BPF maps.

Kris Van Hees kris.van.hees at oracle.com
Fri May 29 10:59:39 PDT 2020


Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
---
 bpf/get_gvar.c | 2 +-
 bpf/get_tvar.c | 2 +-
 bpf/set_gvar.c | 2 +-
 bpf/set_tvar.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/bpf/get_gvar.c b/bpf/get_gvar.c
index 04e283ec..59c4334d 100644
--- a/bpf/get_gvar.c
+++ b/bpf/get_gvar.c
@@ -10,7 +10,7 @@
 # define noinline	__attribute__((noinline))
 #endif
 
-struct bpf_map_def gvars;
+extern struct bpf_map_def gvars;
 
 noinline uint64_t dt_get_gvar(uint32_t id)
 {
diff --git a/bpf/get_tvar.c b/bpf/get_tvar.c
index c0fe447e..6c8c1d2a 100644
--- a/bpf/get_tvar.c
+++ b/bpf/get_tvar.c
@@ -10,7 +10,7 @@
 # define noinline	__attribute__((noinline))
 #endif
 
-struct bpf_map_def tvars;
+extern struct bpf_map_def tvars;
 
 noinline uint64_t dt_get_tvar(uint32_t id)
 {
diff --git a/bpf/set_gvar.c b/bpf/set_gvar.c
index 6cb5ed95..c1887eea 100644
--- a/bpf/set_gvar.c
+++ b/bpf/set_gvar.c
@@ -10,7 +10,7 @@
 # define noinline	__attribute__((noinline))
 #endif
 
-struct bpf_map_def gvars;
+extern struct bpf_map_def gvars;
 
 noinline void dt_set_gvar(uint32_t id, uint64_t val)
 {
diff --git a/bpf/set_tvar.c b/bpf/set_tvar.c
index 297fba31..d7c48665 100644
--- a/bpf/set_tvar.c
+++ b/bpf/set_tvar.c
@@ -10,7 +10,7 @@
 # define noinline	__attribute__((noinline))
 #endif
 
-struct bpf_map_def tvars;
+extern struct bpf_map_def tvars;
 
 noinline void dt_set_tvar(uint32_t id, uint64_t val)
 {
-- 
2.26.0




More information about the DTrace-devel mailing list