[all-commits] [llvm/llvm-project] 36cb73: [BOLT] Ignore PC-relative relocations from data to...

maksfb via All-commits all-commits at lists.llvm.org
Wed Apr 13 11:14:33 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 36cb736665dbdaefd188d54376dc6c7f92e1fb68
      https://github.com/llvm/llvm-project/commit/36cb736665dbdaefd188d54376dc6c7f92e1fb68
  Author: Maksim Panchenko <maks at fb.com>
  Date:   2022-04-13 (Wed, 13 Apr 2022)

  Changed paths:
    M bolt/lib/Rewrite/RewriteInstance.cpp
    A bolt/test/X86/data-to-data-pcrel.s

  Log Message:
  -----------
  [BOLT] Ignore PC-relative relocations from data to data

BOLT expects PC-relative relocations in data sections to reference code
and the relocated data to form a jump table. However, there are cases
where PC-relative addressing is used for data-to-data references
(e.g. clang-15 can generate such code). BOLT should recognize and ignore
such relocations. Otherwise, they will be considered relocations not
claimed by any jump table and cause a failure in the strict mode.

Reviewed By: yota9, Amir

Differential Revision: https://reviews.llvm.org/D123650




More information about the All-commits mailing list