Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few cosmetic fixes #858

Merged
merged 5 commits into from
Jun 24, 2023
Merged

A few cosmetic fixes #858

merged 5 commits into from
Jun 24, 2023

Conversation

julliard
Copy link
Contributor

A few cosmetic fixes for things spotted while trying to do a PE build under Wine. These should all be no-ops.

julliard added 5 commits June 24, 2023 18:06
It's already included from box64context.h.

Since there's no pthread.h on Win32, including it only once avoids
having to add ifdefs everywhere.
To avoid 'function declaration is not a prototype' warnings when using
-Wstrict-prototypes.
It's not used, and conflicts with the original Zydis headers.
@ptitSeb ptitSeb merged commit 770cba7 into ptitSeb:main Jun 24, 2023
@ptitSeb
Copy link
Owner

ptitSeb commented Jun 24, 2023

a PE build ... of box64? are you plugin box64 in wine peloader or something like that? removing elfloader and using something PE oriented instead?

@julliard
Copy link
Contributor Author

What I'm trying to do is basically use only the emulator parts, and plug it into the existing wow64 support, so syscalls go to Wow64SystemServiceEx which takes care of 32->64 transitions, and Wine handles everything else on the 64-bit side.

@ptitSeb
Copy link
Owner

ptitSeb commented Jun 24, 2023

Nice.

Signals are also probably a bit tricky too.

@theofficialgman
Copy link
Contributor

What I'm trying to do is basically use only the emulator parts, and plug it into the existing wow64 support, so syscalls go to Wow64SystemServiceEx which takes care of 32->64 transitions, and Wine handles everything else on the 64-bit side.

by that do you mean you trying to build wine on ARM64 with --enable-archs=i386,x86_64.aarch64 so that the wine PE userspace is linux aarch64 (eg: wine lib folder looks like aarch64-unix aarch64-windows i386-windows x86_64-windows) and you are using box64 for any/all x86/x64 binary recompilation only? I couldn't get that to work with wine/box64 as it is. wine would never call box64... it juser errored whenever it met x86/x64 code

@julliard
Copy link
Contributor Author

Signals are also probably a bit tricky too.

All we really need from the emulator is to fetch the current context, all signal handling is done on the Wine side. When the exception needs to be handled in 32-bit we reenter emulation through KiUserExceptionDispatcher. It seems to work OK in emulation mode, but I haven't tried dynarec yet.

@julliard julliard deleted the cosmetics branch June 24, 2023 20:55
@julliard
Copy link
Contributor Author

by that do you mean you trying to build wine on ARM64 with --enable-archs=i386,x86_64.aarch64 so that the wine PE userspace is linux aarch64 (eg: wine lib folder looks like aarch64-unix aarch64-windows i386-windows x86_64-windows) and you are using box64 for any/all x86/x64 binary recompilation only? I couldn't get that to work with wine/box64 as it is. wine would never call box64... it juser errored whenever it met x86/x64 code

Yes, the Unix interfaces and ntdll are aarch64, the rest is x86 PE code running through emulation.

For x64 the plan is to implement ARM64EC and have basically all of Wine run as native ARM code, but the ARM64EC toolchain is not ready yet.

@Heasterian
Copy link
Contributor

Small question from me. Is it going to work with wineandroid.drv?

@julliard
Copy link
Contributor Author

Small question from me. Is it going to work with wineandroid.drv?

It should work fine, but wineandroid.drv is pretty much abandoned at the moment, someone will have to pick it up again. Maybe emulation support will create some new motivation to maintain it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants