poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] pickles: remove PE.opt_hdr.loader_flags == 0 constraint


From: Jose E. Marchesi
Subject: Re: [PATCH] pickles: remove PE.opt_hdr.loader_flags == 0 constraint
Date: Thu, 11 Jul 2024 08:06:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Applied to master on your behalf.
Thanks!

> As discussed on IRC, even though the specification says that this field
> "must be zero", .dll files compiled with dotnet(1) on Linux seem to have
> this field set to 4096 (0x00001000) instead of 0, and, analysing the
> .dll files I have installed on my PC (mostly from wine), although most
> of them have this field set to 0, a non-insignificant number of them has
> it set to 4096 too.
> It is probably a good idea to remove this constraint then.
> ---
>  pickles/pe.pk | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/pickles/pe.pk b/pickles/pe.pk
> index ef2799a3..37140a9e 100644
> --- a/pickles/pe.pk
> +++ b/pickles/pe.pk
> @@ -1034,8 +1034,9 @@ type PE_Opt_Hdr =
>        offset<uint<32>,B> s32;
>      } size_of_heap_commit;
>  
> -    /* Loader flags.  This is reserved and must be zero.  */
> -    uint<32> loader_flags == 0;
> +    /* Loader flags.  This is reserved and should be zero.
> +       However, sometimes it is not zero.  */
> +    uint<32> loader_flags;
>  
>      /* Number of data-directory entries in the remainder of the
>         optional header.  */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]