[all-commits] [llvm/llvm-project] 7e8a90: [LLD] Add CLASS syntax to SECTIONS (#95323)

Daniel Thornburgh via All-commits all-commits at lists.llvm.org
Mon Aug 5 13:07:07 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7e8a9020b1ae3dea28c19f0cd68743482dca13d9
      https://github.com/llvm/llvm-project/commit/7e8a9020b1ae3dea28c19f0cd68743482dca13d9
  Author: Daniel Thornburgh <dthorn at google.com>
  Date:   2024-08-05 (Mon, 05 Aug 2024)

  Changed paths:
    M lld/ELF/InputSection.cpp
    M lld/ELF/InputSection.h
    M lld/ELF/LinkerScript.cpp
    M lld/ELF/LinkerScript.h
    M lld/ELF/MapFile.cpp
    M lld/ELF/OutputSections.h
    M lld/ELF/ScriptParser.cpp
    M lld/docs/ELF/linker_script.rst
    M lld/docs/ReleaseNotes.rst
    A lld/test/ELF/linkerscript/section-class.test

  Log Message:
  -----------
  [LLD] Add CLASS syntax to SECTIONS (#95323)

This allows the input section matching algorithm to be separated from
output section descriptions. This allows a group of sections to be
assigned to multiple output sections, providing an explicit version of
--enable-non-contiguous-regions's spilling that doesn't require altering
global linker script matching behavior with a flag. It also makes the
linker script language more expressive even if spilling is not intended,
since input section matching can be done in a different order than
sections are placed in an output section.

The implementation reuses the backend mechanism provided by
--enable-non-contiguous-regions, so it has roughly similar semantics and
limitations. In particular, sections cannot be spilled into or out of
INSERT, OVERWRITE_SECTIONS, or /DISCARD/. The former two aren't
intrinsic, so it may be possible to relax those restrictions later.



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