[all-commits] [llvm/llvm-project] 18fa9f: [LLD][COFF] Add support for ARM64EC delay-load imp...

Jacek Caban via All-commits all-commits at lists.llvm.org
Mon Sep 30 11:27:16 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 18fa9fa0439d483060cee42412926565838822d4
      https://github.com/llvm/llvm-project/commit/18fa9fa0439d483060cee42412926565838822d4
  Author: Jacek Caban <jacek at codeweavers.com>
  Date:   2024-09-30 (Mon, 30 Sep 2024)

  Changed paths:
    M lld/COFF/DLL.cpp
    M lld/COFF/DLL.h
    M lld/COFF/Driver.cpp
    M lld/COFF/Writer.cpp
    M lld/test/COFF/Inputs/loadconfig-arm64ec.s
    A lld/test/COFF/arm64ec-delayimport.test

  Log Message:
  -----------
  [LLD][COFF] Add support for ARM64EC delay-load imports (#110042)

Fill the regular delay-load IAT with x86_64 delay-load thunks. Similarly
to regular imports, create an auxiliary IAT and its copy for ARM64EC
calls. These are filled with the same `__impchk_` thunks used for
regular imports, which perform an indirect call with
`__icall_helper_arm64ec` on the regular delay-load IAT. These auxiliary
IATs are exposed via CHPE metadata starting from version 2.

The MSVC linker creates one more copy of the auxiliary IAT. `__imp_func`
symbols refer to that hidden IAT, while the `#func` thunk performs a
call with the public auxiliary IAT. If the public auxiliary IAT is fine
for `#func`, it should be fine for calls using the `__imp_func` symbol
as well. Therefore, I made `__imp_func` refer to that IAT too.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list