[all-commits] [llvm/llvm-project] e4118a: [ELF] Fix early overflow check in finalizeAddressD...

Andreu Carminati via All-commits all-commits at lists.llvm.org
Wed Jun 14 15:26:44 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e4118a7ac0fc2347e78d7c87a1663b70e8ab71ed
      https://github.com/llvm/llvm-project/commit/e4118a7ac0fc2347e78d7c87a1663b70e8ab71ed
  Author: Andreu Carminati <andreu.carminati at hightec-rt.com>
  Date:   2023-06-14 (Wed, 14 Jun 2023)

  Changed paths:
    M lld/ELF/LinkerScript.cpp
    M lld/ELF/LinkerScript.h
    M lld/ELF/Writer.cpp
    A lld/test/ELF/linkerscript/end-overflow-check.test
    M lld/test/ELF/linkerscript/memory-err.s

  Log Message:
  -----------
  [ELF] Fix early overflow check in finalizeAddressDependentContent

LLD terminates with errors when it detects overflows in the
finalizeAddressDependentContent calculation. Although, sometimes, those errors
are not really errors, but an intermediate result of an ongoing address
calculation.  If we continue the fixed-point algorithm we can converge to the
correct result.

This patch

* Removes the verification inside the fixed point algorithm.
* Calls checkMemoryRegions at the end.

Reviewed By: peter.smith, MaskRay

Differential Revision: https://reviews.llvm.org/D152170




More information about the All-commits mailing list