binutils >= 2.41 makes .rsrc section read-only
Jeremy Drake
cygwin@jdrake.com
Tue Feb 20 05:41:05 GMT 2024
This is probably the right thing to do, but breaks building msys2-runtime
(read: cygwin) 3.3, because the _cygheap_start symbol is actually in the
.rsrc section and code very early attempts to memset _cygheap_start.
Couple of questions:
1) is there actually a good reason that _cygheap_start is in the .rsrc and
not the .cygheap section?
2) how could I make the .rsrc section read/write again? I attempted to
use objcopy --set-section-flags .rsrc=contents,alloc,load,data a.dll b.dll
(or a.o b.o with .o files straight out of windres), but it does not seem
to actually clear the readonly flag. I was able to set the 'code' flag,
so it is actually finding the right section.
See also https://github.com/msys2/msys2-runtime/issues/200
More information about the Cygwin
mailing list