This is an archive of the discontinued LLVM Phabricator instance.

[BPF] Remove relocation for patchable externs
ClosedPublic

Authored by yonghong-song on Oct 9 2019, 10:42 PM.

Details

Summary

Previously, patchable extern relocations are introduced to patch
external variables used for multi versioning in
compile once, run everywhere use case. The load instruction
will be converted into a move with an patchable immediate
which can be changed by bpf loader on the host.

The kernel verifier has evolved and is able to load
and propagate constant values, so compiler relocation
becomes unnecessary. This patch removed codes related to this.

Diff Detail

Event Timeline

yonghong-song created this revision.Oct 9 2019, 10:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 9 2019, 10:42 PM
ast accepted this revision.Oct 9 2019, 10:48 PM
This revision is now accepted and ready to land.Oct 9 2019, 10:48 PM
This revision was automatically updated to reflect the committed changes.
llvm/test/CodeGen/BPF/CORE/patchable-extern-uint.ll