News for hackers. Stuff that matters.
Re:Zig: Drop MinGW-w64 by jchw on Sunday December 19, 2021 @03:15PM (#29617883)
This is useful information, and I think it explains exactly how we wound up with pseudo relocs instead of thunks, but honestly, the thing that makes this so bothersome is that there's really no documentation that explains this, there's seemingly no warning when it occurs, and there's no error when it fails.

From my perspective, I saw WINE crashing with a CALL into seemingly nowhere. Then I realized the CALL on disk pointed directly to the IAT (which obviously makes no sense.) Finally I realized that the library probably shouldn't be linking to VirtualProtect, traced it to the entrypoint, and found an error message that made me aware of the existence of pseudo relocs.

There was a 0% chance the person who created this bug was ever going to figure it out, and I'm not even sure I could've figured out the build issue if I had access to the project files. There's plenty of minutiae when it comes to MinGW and MSys and a lot of people are not adequately prepared for what they are getting themselves into. I think (hope) the mess with exception handling is cleared up and everyone just uses SEH on Windows, but I bet there's still issues with licensing and winpthreads, and MSys and PTYs.

I'd be more than happy to try to submit PRs to help with this particular problem, though I'm not going to lie, I find the pseudo-reloc thing horrifying and would be afraid of somehow breaking some ridiculous edge case.

Re:Zig: Drop MinGW-w64 by mstorsjo on Sunday December 19, 2021 @03:27PM (#29618002)
Regarding error reporting - yeah, it's super non obvious when that happens. See the sibling post I made; I've added error reporting for that case now (2 months ago, so not in any released version yet).