[PATCH] D56729: [RuntimeDyld][BPF] load additional sections

Yonghong Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 15 09:26:13 PST 2019


yonghong-song created this revision.
yonghong-song added a reviewer: lhames.
Herald added subscribers: llvm-commits, mgorny.

With target bpf and -g, current clang/llvm compiler generates
two sections, .BTF and .BTF.ext, for BPF debugging. 
The .BTF does not have any symbols, and does not have any
relocations either. Hence, even with ProcessAllSections
enabled, it is not loaded by runtime dynamic linker.

This patch extended RuntimeDyldELF with a BPF subclass.
The RuntimeDyldELFBPF overrided finalizeLoad() such that
first loads .BTF section if it exists and then proceeds
with the rest finalizeLoad() operation.

Signed-off-by: Yonghong Song <yhs at fb.com>


Repository:
  rL LLVM

https://reviews.llvm.org/D56729

Files:
  lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt
  lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
  lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldELFBPF.cpp
  lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldELFBPF.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56729.181805.patch
Type: text/x-patch
Size: 3962 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190115/9669a787/attachment.bin>


More information about the llvm-commits mailing list