diff options
author | Maciej Żenczykowski <maze@google.com> | 2020-02-21 11:14:10 -0800 |
---|---|---|
committer | Maciej Żenczykowski <maze@google.com> | 2020-03-19 19:39:07 -0700 |
commit | 410ebe0c753c8465862df2e34cb6563ca46209fe (patch) | |
tree | f559c7f463967a2e9b9912c0765576344812b26b /progs | |
parent | 6161ff246f648c1375e3a7fd2a271ee18dbc8b43 (diff) | |
download | bpf-410ebe0c753c8465862df2e34cb6563ca46209fe.tar.gz |
add LICENSE() macro
Test: builds
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I46db3e87e87b8237f4bbf53aa345826826ddb46d
Diffstat (limited to 'progs')
-rw-r--r-- | progs/include/bpf_helpers.h | 3 |
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. |