[ld] 2.36 PE flags changes (PR19011, commit 514b4e19)
ASSI
Stromeko@nexgo.de
Sun Feb 28 12:22:55 GMT 2021
This change is fundamentally incompatible with how Cygwin operates (and
also MSys2 since they're using the same code base, although they don't
seem to have that fully realized yet). So I'll have to patch it out for
Cygwin (and likely MingW64 the cross compilation toolchain to be safe).
I am wondering how this change made it into the code base without a
configure option. Also, the way it was announced is somewhat misleading
since it also affects executables, not just DLL (I wasn't even aware
that ASLR would affect executables, but it does -- if anybody knows
where that is documented, please let me know). In other words, you can
create failures by simply compiling to an a.out file since that will now
have both ASLR and NX switched on for i686 and additionally high entropy
for x86_64 as this excerpt from running a bog standard configure test
for fork shows:
--8<---------------cut here---------------start------------->8---
checking for working fork... 1 [main] conftest 7615 D:\Freeware\CygProShare\cygpkgs\mosh\mosh.x86\build\conftest.exe: *** fatal error in forked process - fork: can't reserve
memory for parent stack 0x1400000 - 0x1600000, (child has 0x840000 - 0xA40000), Win32 error 487
74330 [main] conftest 7615 cygwin_exception::open_stackdumpfile: Dumping stack trace to conftest.exe.stackdump
1 [main] conftest 7614 dofork: child -1 - forked process 1224 died unexpectedly, retry 0, exit code 0x100, errno 11
no
--8<---------------cut here---------------end--------------->8---
In this case either the space that the stack occupied in the parent got
clobbered in the forked image or the stack itself got moved. I'm
suspecting the latter since I have never seen additional mappings in a
process on fork before, especially not when the image uses only
cygwin1.dll and nothing else.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs
More information about the Binutils
mailing list