[all-commits] [llvm/llvm-project] a33687: [RuntimeDyld] Add allowStubs/allowZeroSyms
Rafael Auler via All-commits
all-commits at lists.llvm.org
Tue May 18 11:36:35 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a33687ec584d18dc0d092853d583d7116808459c
https://github.com/llvm/llvm-project/commit/a33687ec584d18dc0d092853d583d7116808459c
Author: Rafael Auler <rafaelauler at fb.com>
Date: 2021-05-18 (Tue, 18 May 2021)
Changed paths:
M llvm/include/llvm/ExecutionEngine/JITSymbol.h
M llvm/include/llvm/ExecutionEngine/RuntimeDyld.h
M llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
M llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
Log Message:
-----------
[RuntimeDyld] Add allowStubs/allowZeroSyms
This patch introduces functionality used by BOLT when
re-linking the final binary. It adds to MemoryManager a new member
function allowStubAllocation to control whether this MemoryManager
supports increasing code size with stubs or not. Since BOLT can
rewrite some files in-place, it needs to avoid stub insertion done
by the linker. This patch also introduces allowsZeroSymbols to the
JITSymbolResolver class, enabling us to finish a link successfully
even when some symbols resolve to the value zero. When rewriting a
binary, sometimes we do need to resolve a target to zero in case
the input binary calls address zero and we want to be bug
compatible. We also expose reassignSectionAddress as it is used by
BOLT.
Reviewed By: lhames
Differential Revision: https://reviews.llvm.org/D97898
More information about the All-commits
mailing list