[all-commits] [llvm/llvm-project] f66f2f: [LLD][COFF] add __{data, bss}_{start, end}__ symbols...

jeremyd2019 via All-commits all-commits at lists.llvm.org
Fri May 2 00:58:35 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f66f2fe0e5be6dc6eb3ef4d42af8692f9adcdc80
      https://github.com/llvm/llvm-project/commit/f66f2fe0e5be6dc6eb3ef4d42af8692f9adcdc80
  Author: jeremyd2019 <github at jdrake.com>
  Date:   2025-05-02 (Fri, 02 May 2025)

  Changed paths:
    M lld/COFF/Driver.cpp
    M lld/COFF/Writer.cpp
    A lld/test/COFF/cygwin-symbols.s

  Log Message:
  -----------
  [LLD][COFF] add __{data,bss}_{start,end}__ symbols for Cygwin support (#136180)

Cygwin requires these symbols for its fork emulation to know what data
to copy into the child. GNU ld defines these symbols for MinGW targets
also, so do the same here.

Cygwin also has the `.data_cygwin_nocopy` section, which is merged into
`.data` outside the `__data_start__` to `__data_end__` range. This
excludes it from fork's copying. AFAIK it's only used by the Cygwin DLL
itself (which requires a custom linker script to link, that's not
supported by LLD), but the section is included in GNU ld's default
linker script so handle it here too.

Signed-off-by: Jeremy Drake <github at jdrake.com>



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