Possible bug in binutils for MinGW-w64 related to linking weak symbols

Eric Botcazou ebotcazou@libertysurf.fr
Thu Mar 19 13:48:17 GMT 2026


> We had that discussion on the mingw list already, but in my opinion
> both foo and bar are properly defined, so not being able to link foo
> looks like a bug to me. It works with clang/llvm.

__attribute__((weak))__ is a GNU extension so the GNU toolchain is the de 
facto reference implementation for it.  Requiring that the attribute be used 
consistently on all the declarations seems fairly reasonable to me.

-- 
Eric Botcazou




More information about the Binutils mailing list