[PATCH v2] elf: early conversion of elf p_flags to mprotect flags

Cupertino Miranda cupertino.miranda@oracle.com
Thu Jul 3 14:17:56 GMT 2025


Hi Andreas,

Thank you for the findings.
Actually, while looking at the patch I realized that this code was 
duplicated since I forgot to remove it from the original location in 
sysdeps/generic/ldsodefs.h.

Cheers,
Cupertino

On 03-07-2025 13:03, Andreas Schwab wrote:
> On Jul 03 2025, Cupertino Miranda wrote:
> 
>> +/* ELF uses the PF_x macros to specify the segment permissions, mmap
>> +   uses PROT_xxx.  In most cases the three macros have the values 1, 2,
>> +   and 3 but not in a matching order.  The following macros allows
> 
> 1,2,4, not 1,2,3.
> 



More information about the Libc-alpha mailing list