[all-commits] [llvm/llvm-project] 7a4d77: [ELF] Fix location counter used for output section...

Deepak Shirke via All-commits all-commits at lists.llvm.org
Fri May 29 02:58:52 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7a4d7733ae55ef8ac139d80e2b0f2bd1951ff5c8
      https://github.com/llvm/llvm-project/commit/7a4d7733ae55ef8ac139d80e2b0f2bd1951ff5c8
  Author: Deepak Shirke <117824396+deepakshirkem at users.noreply.github.com>
  Date:   2026-05-29 (Fri, 29 May 2026)

  Changed paths:
    M lld/ELF/LinkerScript.cpp
    M lld/docs/ReleaseNotes.rst
    M lld/test/ELF/linkerscript/end-overflow-check.test
    A lld/test/ELF/linkerscript/memory-loc-counter-dot-addr.s

  Log Message:
  -----------
  [ELF] Fix location counter used for output section address with MEMOR… (#197293)

When a section uses '.' as its address expression inside a MEMORY region
(e.g. 's02 . : { ... } > FLASH'), lld was incorrectly evaluating '.'
against the memory region's current position instead of the global
location counter. Save the global dot before the memRegion override and
restore it when an explicit addrExpr is present.

Fixes #112919

@maskray @smithp35 could you please review this patch?



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