Output section type (READONLY)
Nick Clifton
nickc@redhat.com
Mon Jan 31 13:33:30 GMT 2022
Hi Fangrui,
> Well, READONLY has another behavior that it forces non-SHF_WRITE output
> even if an input section has the SHF_WRITE flag.
> I find this quite dangerous if an input section has the SHF_WRITE flag.
> I do not see in what circumstances a user may want this behavior.
> This just seems very dangerous to use in general.
So basically what you are saying is that if a input section is assigned
to an output sections with incompatible attributes (presumably because of a
linker script declaration) then the linker should issue a warning message,
yes ?
By extension then, this feature should cover not just the readonly section
attribute, but the NOLOAD attribute as well.
This sounds like it might be an interesting feature to implement for someone
looking to gain experience with the binutils.
Cheers
Nick
More information about the Binutils
mailing list