On Tue Jan 13 01:30:22 2026 +0000, Jacek Caban wrote:
Here is a version that seems to work for me: https://gitlab.winehq.org/jacek/wine/-/commits/ctors. `_initterm` and `_initterm_e` need to be in separate object files to avoid duplicate symbol (some crt version implement only one variant; if pulling in the other variant pulls both of them from a static lib, we get a duplicate symbol). I also made other clean ups and avoided the need for a new static library by tweaking makedep and using `__ASM_GLOBAL_IMPORT`. How does it look for you? Thanks. I've tested it and it works for me as well.
* * * Can you help me understand why my attempt doesn't work?
`_initterm` and `_initterm_e` need to be in separate object files to avoid duplicate symbol
Yeah I have [that](https://gitlab.winehq.org/wine/wine/-/merge_requests/9265/diffs?commit_id=e7...) as well.
using `__ASM_GLOBAL_IMPORT`
Thanks. Adding it fixed this error for me: ``` NOTE: a relevant symbol '_initterm' is available in dlls/winecrtend/x86_64-windows/libwinecrtend.a but cannot be used because it is not an import library. ``` But I am still getting `error: duplicate symbol: __initterm`. My failed attempt is [here](https://gitlab.winehq.org/yshui/wine/-/commits/ctor-dtor-dup-symbols) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9265#note_126881