[PATCH] winebuild: Rename delay import libs .text$2 section to .data$2.

Alexandre Julliard julliard at winehq.org
Fri Oct 22 14:22:58 CDT 2021


Rémi Bernon <rbernon at codeweavers.com> writes:

> GNU dlltool outputs the DELAY_IMPORT_DESCRIPTOR of delay import libs in
> a .text$2 section, which is then merged into .text and changes its flags
> to add the DATA flag.
>
> This is incorrect and breaks some DRMs, which are then validating that
> .text sections doesn't have the IMAGE_SCN_CNT_INITIALIZED_DATA flag set.
>
> Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
> ---
>
> This is actually more some kind of RFC, as I'm not sure at all what this
> change really implies and why the descriptor has to be in .text in the
> first place. It seems like some GNU specific thing, as it seems from
> internet comments that MSVC places the descriptor in .data section?

Yes, it sounds like it should be fixed in binutils. Sadly the delay
import support in dlltool is not great, maybe we should try to find a
way to bypass it.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list