[all-commits] [llvm/llvm-project] 7f6cee: BPF: add extern func to data sections if specified
yonghong-song via All-commits
all-commits at lists.llvm.org
Thu Jun 10 16:12:20 PDT 2021
Branch: refs/heads/release/12.x
Home: https://github.com/llvm/llvm-project
Commit: 7f6ceec93541633993b08cc97703c0771c1977c8
https://github.com/llvm/llvm-project/commit/7f6ceec93541633993b08cc97703c0771c1977c8
Author: Yonghong Song <yhs at fb.com>
Date: 2021-06-10 (Thu, 10 Jun 2021)
Changed paths:
M llvm/lib/Target/BPF/BTFDebug.cpp
M llvm/lib/Target/BPF/BTFDebug.h
M llvm/test/CodeGen/BPF/BTF/extern-var-func-weak-section.ll
M llvm/test/CodeGen/BPF/BTF/extern-var-section.ll
M llvm/test/CodeGen/BPF/BTF/extern-var-weak-section.ll
Log Message:
-----------
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
(cherry picked from commit 886f9ff53155075bd5f1e994f17b85d1e1b7470c)
More information about the All-commits
mailing list