RFC: Add a linker warning when creating segments with RWX permissions
Nick Clifton
nickc@redhat.com
Tue Apr 26 16:39:47 GMT 2022
Hi Jan,
>> +static inline bool
>> +is_memory_resident (const Elf_Internal_Phdr *src)
>> +{
>> + /* FIXME: Should we return true for PT_TLS segments ? */
>> + return src->p_type == PT_LOAD;
>> +}
>
> I think for PT_TLS you would want to warn if X is set, no matter
> whether R and W are also both set?
Agreed.
> How would one go about silencing this warning without splitting the
> segment?
Hmmm - a good point. There needs to be a new option to silence the warning.
Either that or the --no-warn-execstack option could be extended to silence
this warning.
Cheers
Nick
More information about the Binutils
mailing list