[PATCH] D59441: [BPF] Add BTF Var and DataSec Support

Yonghong Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 15 22:38:35 PDT 2019


yonghong-song marked 2 inline comments as done.
yonghong-song added inline comments.


================
Comment at: lib/Target/BPF/BTF.h:174
+  VAR_GLOBAL_ALLOCATED = 1, ///< Linkage: ExternalLinkage
+  VAR_GLOBAL_TENTATIVE = 2, ///< Linkage: CommonLinkage
+  VAR_GLOBAL_EXTERNAL = 3,  ///< Linkage: ExternalLinkage
----------------
ast wrote:
> this two are unused. Reserved for future ?
Yes, for future but we can always change.
I put it here so when we implement the kernel interface, we will have a rough idea what to expect.


================
Comment at: lib/Target/BPF/BTFDebug.cpp:326
+  BTFType.Info = Kind << 24;
+  BTFType.Size = 0;
+}
----------------
ast wrote:
> too bad that compiler cannot determine it at the point of btf emission.
> i think it's ok to ask libbpf to fix it up.
Right. It is too early in the compilation. We need loader to fix it up.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59441/new/

https://reviews.llvm.org/D59441





More information about the llvm-commits mailing list