diff options
author | Rafael Auler <rafaelauler@fb.com> | 2021-05-17 17:18:15 -0700 |
---|---|---|
committer | Rafael Auler <rafaelauler@fb.com> | 2021-05-18 11:35:27 -0700 |
commit | a33687ec584d18dc0d092853d583d7116808459c (patch) | |
tree | c185f75bb37786ae9671fbfb9862e3d475bd193f /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | 8cd199b85f907a7349bc5cb1b3d3562e0e79b72c (diff) | |
download | llvm-a33687ec584d18dc0d092853d583d7116808459c.zip llvm-a33687ec584d18dc0d092853d583d7116808459c.tar.gz llvm-a33687ec584d18dc0d092853d583d7116808459c.tar.bz2 |
[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
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions