[PATCH] D122106: [BOLT] NFC: Fix dynamic relocation offset for constant islands

Vladislav Khmelevsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 20 14:48:58 PDT 2022


yota9 created this revision.
yota9 added reviewers: maksfb, rafauler, Amir.
Herald added a subscriber: ayermolo.
Herald added a project: All.
yota9 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Currently we don't fix dynamic relocation offset, assuming it is used
only for data sections that we don't move by bolt. But the constant
islands might have such a relocations too. The size of the functions and
the functions order might be changed during the bolt process, which will
ruin the initial relocation offset. This patch tries to eliminate this
problem by storing the emitted static relocation label and setting the
dynamic relocation output offset during the updateOutputValues.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122106

Files:
  bolt/include/bolt/Core/BinarySection.h
  bolt/include/bolt/Core/Relocation.h
  bolt/lib/Core/BinaryFunction.cpp
  bolt/lib/Core/Relocation.cpp
  bolt/lib/Rewrite/RewriteInstance.cpp
  bolt/test/runtime/AArch64/constant-island-dyn-rel.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122106.416800.patch
Type: text/x-patch
Size: 6125 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220320/956cf902/attachment.bin>


More information about the llvm-commits mailing list