summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--progs/include/bpf_helpers.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/progs/include/bpf_helpers.h b/progs/include/bpf_helpers.h
index 09c3373..8ff155f 100644
--- a/progs/include/bpf_helpers.h
+++ b/progs/include/bpf_helpers.h
@@ -9,6 +9,9 @@
/* place things in different elf sections */
#define SEC(NAME) __attribute__((section(NAME), used))
+/* Example use: LICENSE("GPL"); or LICENSE("Apache 2.0"); */
+#define LICENSE(NAME) char _license[] SEC("license") = (NAME)
+
/*
* Helper functions called from eBPF programs written in C. These are
* implemented in the kernel sources.