[all-commits] [llvm/llvm-project] 0776fc: [BOLT] Search section based on relocation symbol

Alexey Moksyakov via All-commits all-commits at lists.llvm.org
Tue Feb 7 13:16:39 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0776fc32b15dc76c6b43c41fc4471552833265de
      https://github.com/llvm/llvm-project/commit/0776fc32b15dc76c6b43c41fc4471552833265de
  Author: yavtuk <yavtuk at ya.ru>
  Date:   2023-02-08 (Wed, 08 Feb 2023)

  Changed paths:
    M bolt/lib/Rewrite/RewriteInstance.cpp
    A bolt/test/AArch64/Inputs/array_end.lld_script
    A bolt/test/AArch64/array_end.c

  Log Message:
  -----------
  [BOLT] Search section based on relocation symbol

We need to search referenced section based on relocations symbol section
to properly match end section symbols. For example on some binaries we
can observe that init_array_end/fini_array_end might be "placed" in to
the gap and since no section could be found for address the relocation
would be skipped resulting in wrong ADRP imm after emitting new text
resulting in binary sigsegv.

Credits for the test to Vladislav Khmelevskii aka yota9.




More information about the All-commits mailing list