[all-commits] [llvm/llvm-project] 5d621e: [ELF] Consider that NOLOAD sections should be plac...

Konstantin Schwarz via All-commits all-commits at lists.llvm.org
Wed Jun 16 03:37:19 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5d621ed85ddb240f14e3fae8f94afd56d0ef9c58
      https://github.com/llvm/llvm-project/commit/5d621ed85ddb240f14e3fae8f94afd56d0ef9c58
  Author: Konstantin Schwarz <konstantin.schwarz at hightec-rt.com>
  Date:   2021-06-16 (Wed, 16 Jun 2021)

  Changed paths:
    M lld/ELF/Writer.cpp
    M lld/test/ELF/linkerscript/nobits-offset.s
    M lld/test/ELF/linkerscript/noload.s

  Log Message:
  -----------
  [ELF] Consider that NOLOAD sections should be placed in a PT_LOAD segment

During PHDR creation, the case where an output section does not require a
PT_LOAD header but still occupies memory in the current VMA region was not handled.

If such an output section interleaves two output sections that have the same
VMA and LMA regions set, we would previously re-use the existing PT_LOAD header
for the second output section.
However, since the memory region is not contiguous, we need to start a new PT_LOAD
segment.

This fixes https://bugs.llvm.org/show_bug.cgi?id=50558

Reviewed By: MaskRay

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




More information about the All-commits mailing list