binutils >= 2.41 makes .rsrc section read-only
Jeremy Drake
cygwin@jdrake.com
Wed Feb 21 05:39:31 GMT 2024
On Tue, 20 Feb 2024, Corinna Vinschen wrote:
> On Feb 19 21:41, Jeremy Drake via Cygwin wrote:
> > 1) is there actually a good reason that _cygheap_start is in the .rsrc and
> > not the .cygheap section?
>
> As you know we got rid of this way to define the cygheap, but
> _cygheap_start was just defined this way so it's the address marking
> the start address of the cygheap.
>
> It was just the way it was. It's probably just as well to move
>
> _SYM (_cygheap_start) = .;
>
> to the begining of the .cygheap section. Did you try?
I hadn't; I have now and it seems to work fine. I basically assumed there
was some reason I wasn't aware of for putting it in the .rsrc section, so
focused more on trying to figure out how to get binutils to clear the
readonly section flag. When I couldn't figure that out, I figured I'd ask
here both about the "institutional knowledge" if there was a known reason
why it needed to be in the .rsrc section and because I figured some people
knowledgable in binutils pe stuff might also read this and be able to give
me another idea on making the .rsrc section read/write again if it did
need to stay in that section.
More information about the Cygwin
mailing list