[all-commits] [llvm/llvm-project] d2dd36: [ELF] Better resemble GNU ld when placing orphan s...

Igor Kudrin via All-commits all-commits at lists.llvm.org
Thu Nov 11 00:08:26 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d2dd36bbbe508ba97ab0adc5a834306f6fdc3a78
      https://github.com/llvm/llvm-project/commit/d2dd36bbbe508ba97ab0adc5a834306f6fdc3a78
  Author: Igor Kudrin <ikudrin at accesssoftek.com>
  Date:   2021-11-11 (Thu, 11 Nov 2021)

  Changed paths:
    M lld/ELF/LinkerScript.cpp
    M lld/ELF/LinkerScript.h
    M lld/ELF/Writer.cpp
    A lld/test/ELF/linkerscript/orphan-memory.test

  Log Message:
  -----------
  [ELF] Better resemble GNU ld when placing orphan sections into memory regions

An orphan section should be placed in the same memory region as its
anchor section if the latter specifies the memory region explicitly.
If there is no explicit assignment for the anchor section in the linker
script, its memory region is selected by matching attributes, and the
same should be done for the orphan section.

Before the patch, some scripts that were handled smoothly in GNU ld
caused an "error: no memory region specified for section" in lld.

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




More information about the All-commits mailing list