Skip to content

clang 21.1.0-rc1 creates broken executables on Cygwin/MinGW when linked with GNU ld.bfd #149639

@jeremyd2019

Description

@jeremyd2019

with llvm/clang 20.1.8 (with Cygwin-related patches backported) I am able to build llvm, clang, and lld with clang and am able to strip the resulting executables.

with llvm/clang 21.1.0-rc1 I am able to build with clang but when I attempt to strip executables with llvm-strip I get an error unexpected associative section index (#53433) and when I attempt to strip executables with binutils 2.44 strip I get an executable that crashes on startup (I was able to catch it once during pseudo-relocations).

I don't have much detail yet, but I wanted to get this recorded and have a place to track the investigation. I imagine my next step would be to set up a git bisect operation to try to figure out what's going on. I don't have any ideas on how to reduce a test case, just that lld.exe and clang.exe are bugged, but simple C and C++ hello world executables are not.

/cc @mstorsjo @tyan0 @kikairoya

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:codegenIR generation bugs: mangling, exceptions, etc.

    Type

    No type

    Projects

    Status

    Needs Fix

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions