[all-commits] [llvm/llvm-project] 5c95f6: [LLD] [COFF] Fix handling of immediates in ARM64_S...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Thu May 28 01:04:14 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5c95f6a859394757b92b0d63ff90b9175056deb6
      https://github.com/llvm/llvm-project/commit/5c95f6a859394757b92b0d63ff90b9175056deb6
  Author: Martin Storsjö <martin at martin.st>
  Date:   2026-05-28 (Thu, 28 May 2026)

  Changed paths:
    M lld/COFF/Chunks.cpp
    M lld/test/COFF/arm64-relocs-imports.test

  Log Message:
  -----------
  [LLD] [COFF] Fix handling of immediates in ARM64_SECREL_HIGH12A (#200060)

Just like for PAGEBASE_REL21, the immediate in SECREL_HIGH12A is the
byte offset, not a page offset. The byte level offset is added to the
symbol offset, which only then after that gets shifted right by 12. This
makes the handling of this immediate consistent with what MS link.exe
does.

The existing testcase had a zero immediate in the instruction for this
relocation.

This makes it clear that immediate offsets with SECREL_HIGH12A do work
fine, where the byte level offsets end up carrying over to the upper
bits.



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