mold icon indicating copy to clipboard operation
mold copied to clipboard

Solutions for ```__wine_spec_nt_header```?

Open trcrsired opened this issue 1 year ago • 2 comments
trafficstars

Wine has this special __wine_spec_nt_header

https://github.com/wine-mirror/wine/blob/master/tools/winebuild/spec32.c#L738

is that possible to make the elf linker to print this out so that we can easily build linux .so that can be used in wine PE environment?

trcrsired avatar Aug 14 '24 07:08 trcrsired

Can you explain a little bit more about what you want to do? I know about PE but I'm not a Wine expert. I have no idea what __wine_spec_nt_header is.

PE and ELF are quite different, and it is not easy to convert a Linux .so to a PE file.

rui314 avatar Aug 14 '24 08:08 rui314

Can you explain a little bit more about what you want to do? I know about PE but I'm not a Wine expert. I have no idea what __wine_spec_nt_header is.

PE and ELF are quite different, and it is not easy to convert a Linux .so to a PE file.

It emits some pesudo PE metadata (like DOS header PE header) into ELF binary as a symbol for ELF binary. The wine loader uses dlopen to open so and calls into the UNIX side.

trcrsired avatar Aug 19 '24 03:08 trcrsired