[PATCH] D145962: [lld] Fill .text section gaps with INT3 only on x86 targets.

Jacek Caban via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 14 10:54:47 PDT 2023


jacek added a comment.

Thanks for the review.

In D145962#4192325 <https://reviews.llvm.org/D145962#4192325>, @mstorsjo wrote:

> So, MS link.exe fills sections with zero? Is that a specific design choice (i.e. does it fill with `0xcc` on x86) or is it simply the case that link.exe doesn't try to fill sections with sentinel instructions at all?

It seems to be a design choice: link.exe does fill with 0xcc on x64. I will add a test case for x64.

FWIW, in on ARM64EC it's a bit more complicated, because we may have both x64 and true ARM64EC code linked together in a single module. Both use the same section (although according to my testing, never the same page, thus even more potential gaps). In theory, it could make sense to use 0xcc fill for x64 parts, but that's not what link.exe does: it uses 0 to fill everything.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145962/new/

https://reviews.llvm.org/D145962



More information about the llvm-commits mailing list