[all-commits] [llvm/llvm-project] 588b95: [ELF][AArch64] Fix unneeded thunk for branches to ...

Joseph Huber via All-commits all-commits at lists.llvm.org
Thu May 19 18:31:14 PDT 2022


  Branch: refs/heads/release/14.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 588b95a2b88ef36b6ac294032ef24cda70c1cf44
      https://github.com/llvm/llvm-project/commit/588b95a2b88ef36b6ac294032ef24cda70c1cf44
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-05-19 (Thu, 19 May 2022)

  Changed paths:
    M lld/ELF/Arch/AArch64.cpp
    M lld/ELF/InputSection.cpp
    M lld/test/ELF/aarch64-undefined-weak.s

  Log Message:
  -----------
  [ELF][AArch64] Fix unneeded thunk for branches to hidden undefined weak

Similar to D119787 for PPC64.

A hidden undefined weak may change its binding to local before some
`isUndefinedWeak` code, so some `isUndefinedWeak` code needs to be changed to
`isUndefined`. The undefined non-weak case has been errored, so just using
`isUndefined` is fine.

The Linux kernel recently has a usage that a branch from 0xffff800008491ee0
references a hidden undefined weak symbol `vfio_group_set_kvm`.
It relies on the behavior that a branch to undefined weak resolving to the next
instruction, otherwise it'd see spurious relocation out of range errors.

Fixes https://github.com/ClangBuiltLinux/linux/issues/1624

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

(cherry picked from commit 02eab52866775f1476028129d1b114235fddc127)


  Commit: 76c1c1dd2a01fa2b2511cd0da3ec71d03addb107
      https://github.com/llvm/llvm-project/commit/76c1c1dd2a01fa2b2511cd0da3ec71d03addb107
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-05-19 (Thu, 19 May 2022)

  Changed paths:
    M clang/lib/Driver/ToolChains/CommonArgs.cpp
    M clang/lib/Driver/ToolChains/CommonArgs.h
    A clang/test/Driver/openmp-library-path.c

  Log Message:
  -----------
  [OpenMP] Fix library path missing when using OpenMP

The changes in D122444 caused OpenMP programs built with the
LLVM_ENABLE_RUNTIMES options to stop finding the libraries. We generally
expect to link against the libraries associated with the clang
installation itself but we no longer implicitly included that directory.
This patch adds in the include path of the clang installations library
to ensure we can find them.

Reviewed By: jdoerfert, MaskRay

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

(cherry picked from commit fceea4e11028f4bfbafbd6893ddeb319420107d9)


Compare: https://github.com/llvm/llvm-project/compare/e70d79f1e8c0...76c1c1dd2a01


More information about the All-commits mailing list