[PATCH] D157148: [lld] Add support for EC code map.

Jacek Caban via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 4 15:46:10 PDT 2023


jacek created this revision.
jacek added a reviewer: mstorsjo.
Herald added subscribers: zzheng, kristof.beyls.
Herald added a project: All.
jacek requested review of this revision.

The patch differs from MSVC's in two aspects that I know about:

- Empty chunks in empty sections (that are discarded anyway) can cause weird empty regions on MSVC (a test for such conditions is in the patch). I skip empty chunks in createECCodeMap to avoid that, but we could potentially remove those skips.
- Range extension thunks may slip out of map ranges on MSVC if they are added after a chunk that is otherwise the last ARM64EC chunk in a range. I tested it locally (the test needs a patch to support ARM64EC to LLD first). To imitate MSVC behaviour, we could move createECCodeMap before finalizeAddresses.

Both of above seem like a bug in MSVC, but they should be easy to imitate if desired.


https://reviews.llvm.org/D157148

Files:
  lld/COFF/Chunks.cpp
  lld/COFF/Chunks.h
  lld/COFF/Driver.cpp
  lld/COFF/Writer.cpp
  lld/test/COFF/Inputs/loadconfig-arm64ec.s
  lld/test/COFF/arm64ec-codemap.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157148.547373.patch
Type: text/x-patch
Size: 10900 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230804/ea040c06/attachment.bin>


More information about the llvm-commits mailing list