[all-commits] [llvm/llvm-project] 02a388: [lld][ELF] Allow explicit address expressions on ....

amosher-nvidia via All-commits all-commits at lists.llvm.org
Sun Jul 12 00:23:06 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 02a38835c2f0cea609290ead1280d1102042081f
      https://github.com/llvm/llvm-project/commit/02a38835c2f0cea609290ead1280d1102042081f
  Author: amosher-nvidia <amosher at nvidia.com>
  Date:   2026-07-12 (Sun, 12 Jul 2026)

  Changed paths:
    M lld/ELF/LinkerScript.cpp
    A lld/test/ELF/linkerscript/tbss-addr-expr.s

  Log Message:
  -----------
  [lld][ELF] Allow explicit address expressions on .tbss output sections (#196447)

D107208 allows consecutive SHF_TLS SHT_NOBITS (.tbss) output sections by
making
each .tbss start at the end address of the previous one
(state->tbssAddr). This
happens unconditionally, so an explicit output section address
(`.tbss ADDR : { ... }`) is silently ignored, unlike GNU ld.

Apply the tbssAddr fallback only when the section has no address
expression.

Some embedded/RTOS applications link the kernel and several mutually
isolated
tasks into a single ELF and require every section, .tbss included, to
sit at a
specific address matching the memory map. Placing a task's .tbss in its
own
protected region is a security boundary: one task must not be able to
modify
another's TLS. Previously lld placed .tbss adjacent to .text in RX
memory
instead of where the linker script directed it, in RW memory.



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