[all-commits] [llvm/llvm-project] 5b0572: [LLD][COFF] Add support for including native ARM64...

Jacek Caban via All-commits all-commits at lists.llvm.org
Thu May 15 02:38:45 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5b0572875cafb02fc144d1f6e6e51a34ef27d951
      https://github.com/llvm/llvm-project/commit/5b0572875cafb02fc144d1f6e6e51a34ef27d951
  Author: Jacek Caban <jacek at codeweavers.com>
  Date:   2025-05-15 (Thu, 15 May 2025)

  Changed paths:
    M lld/COFF/COFFLinkerContext.h
    M lld/COFF/Chunks.cpp
    M lld/COFF/DLL.cpp
    M lld/COFF/Driver.cpp
    M lld/COFF/InputFiles.cpp
    M lld/COFF/SymbolTable.cpp
    M lld/COFF/Writer.cpp
    M lld/test/COFF/arm64ec-entry-mangle.test
    M lld/test/COFF/arm64ec-hybmp.s
    M lld/test/COFF/arm64ec-lib.test
    M lld/test/COFF/arm64ec-patchable-thunks.test
    M lld/test/COFF/arm64ec-range-thunks.s
    M lld/test/COFF/arm64ec.test
    M lld/test/COFF/arm64x-altnames.s
    M lld/test/COFF/arm64x-buildid.s
    M lld/test/COFF/arm64x-comm.s
    M lld/test/COFF/arm64x-crt-sec.s
    M lld/test/COFF/arm64x-ctors-sec.s
    M lld/test/COFF/arm64x-guardcf.s
    M lld/test/COFF/arm64x-import.test
    M lld/test/COFF/arm64x-symtab.s
    M lld/test/COFF/arm64x-wrap.s
    M lld/test/COFF/autoimport-arm64ec-data.test

  Log Message:
  -----------
  [LLD][COFF] Add support for including native ARM64 objects in ARM64EC images (#137653)

MSVC linker accepts native ARM64 object files as input with
`-machine:arm64ec`, similar to `-machine:arm64x`. Its usefulness is very
limited; for example, both exports and imports are not reflected in the
PE structures and can't work. However, their symbol tables are otherwise
functional.

Since we already have handling of multiple symbol tables implemented for
ARM64X, the required changes are mostly about adjusting relevant checks
to account for them on the ARM64EC target.

Delay-load helper handling is a bit of a shortcut. The patch never pulls
it for native object files and just ensures that the code is fine with
that. In general, I think it would be nice to adjust the driver to pull
it only when it's actually referenced, which would allow applying the
same logic to the native symbol table on ARM64EC without worrying about
pulling too much.



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