[all-commits] [llvm/llvm-project] 9b6555: [lld][ELF] Combine uniqued small data sections (#1...

Sam Elliott via All-commits all-commits at lists.llvm.org
Mon Aug 19 09:52:07 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9b65558d2f20463b1a32374165d6fa06696623e9
      https://github.com/llvm/llvm-project/commit/9b65558d2f20463b1a32374165d6fa06696623e9
  Author: Sam Elliott <quic_aelliott at quicinc.com>
  Date:   2024-08-19 (Mon, 19 Aug 2024)

  Changed paths:
    M lld/ELF/LinkerScript.cpp
    M lld/test/ELF/riscv-section-layout.s
    M lld/test/ELF/section-name.s

  Log Message:
  -----------
  [lld][ELF] Combine uniqued small data sections (#104485)

RISC-V GCC with `-fdata-sections` will emit `.sbss.<name>`,
`.srodata.<name>`, and `.sdata.<name>` sections for small data items of
different kinds. Clang/LLVM already emits `.srodata.*` sections, and we
intend to emit the other two section name patterns in #87040.

This change ensures that any input sections starting `.sbss` are
combined into one output section called `.sbss`, and the same
respectively for `.srodata` and `.sdata`. This also allows the existing
RISC-V specific code for determining an output order for `.sbss` and
`.sdata` sections to apply to placing the sections.



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