diff options
author | Yonghong Song <yhs@fb.com> | 2021-03-25 14:09:19 -0700 |
---|---|---|
committer | Yonghong Song <yhs@fb.com> | 2021-03-25 16:03:29 -0700 |
commit | 886f9ff53155075bd5f1e994f17b85d1e1b7470c (patch) | |
tree | 5024ec4574e8c31cbd8404697e8f2defb69e47ee /llvm/lib/CodeGen/MachineVerifier.cpp | |
parent | 3fd64cc7a361ae02f4c0f84f5f6a85a6f05c100c (diff) | |
download | llvm-886f9ff53155075bd5f1e994f17b85d1e1b7470c.zip llvm-886f9ff53155075bd5f1e994f17b85d1e1b7470c.tar.gz llvm-886f9ff53155075bd5f1e994f17b85d1e1b7470c.tar.bz2 |
BPF: add extern func to data sections if specified
This permits extern function (BTF_KIND_FUNC) be added
to BTF_KIND_DATASEC if a section name is specified.
For example,
-bash-4.4$ cat t.c
void foo(int) __attribute__((section(".kernel.funcs")));
int test(void) {
foo(5);
return 0;
}
The extern function foo (BTF_KIND_FUNC) will be put into
BTF_KIND_DATASEC with name ".kernel.funcs".
This will help to differentiate two kinds of external functions,
functions in kernel and functions defined in other bpf programs.
Differential Revision: https://reviews.llvm.org/D93563
Diffstat (limited to 'llvm/lib/CodeGen/MachineVerifier.cpp')
0 files changed, 0 insertions, 0 deletions