From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#50666: 28.0.50; Fix native compilation on Cygwin Date: Thu, 23 Sep 2021 21:01:44 +0300 Message-ID: <83zgs3tblj.fsf@gnu.org> References: <9f20194e-b1ba-9417-4f18-caa1d80b5568@cornell.edu> <01a89ba6-2786-df04-0181-069b50a70331@cornell.edu> <835yux5dn1.fsf@gnu.org> <87bl4pf3s1.fsf@Otto.invalid> <83tuih3uvr.fsf@gnu.org> <877dfcg5tu.fsf@Otto.invalid> <83pmt44vn1.fsf@gnu.org> <83mto84r9l.fsf@gnu.org> <83fsu04mai.fsf@gnu.org> <1a5e01a2-2247-2f68-82f6-2075577e02b6@cornell.edu> <837dfc4hi1.fsf@gnu.org> <4ae8067f-55b2-d243-66f3-f76493095a39@cornell.edu> <83o88jvity.fsf@gnu.org> <8e8e74ce-0deb-bcdc-d298-be2e9d4636d7@cornell.edu> <83bl4juu2c.fsf@gnu.org> <837df7urnz.fsf@gnu.org> <878rznrxm6.fsf@Rainer.invalid> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20203"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50666@debbugs.gnu.org To: Achim Gratz Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 23 20:02:48 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mTT3Y-0004z4-Ht for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Sep 2021 20:02:48 +0200 Original-Received: from localhost ([::1]:34630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTT3X-00028V-52 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Sep 2021 14:02:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53824) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTT2p-00024m-NP for bug-gnu-emacs@gnu.org; Thu, 23 Sep 2021 14:02:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44268) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTT2o-0006un-Ep for bug-gnu-emacs@gnu.org; Thu, 23 Sep 2021 14:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mTT2o-0000q4-C7 for bug-gnu-emacs@gnu.org; Thu, 23 Sep 2021 14:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Sep 2021 18:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50666 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 50666-submit@debbugs.gnu.org id=B50666.16324201183214 (code B ref 50666); Thu, 23 Sep 2021 18:02:02 +0000 Original-Received: (at 50666) by debbugs.gnu.org; 23 Sep 2021 18:01:58 +0000 Original-Received: from localhost ([127.0.0.1]:55814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTT2k-0000pm-60 for submit@debbugs.gnu.org; Thu, 23 Sep 2021 14:01:58 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36550) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTT2i-0000pV-Dx for 50666@debbugs.gnu.org; Thu, 23 Sep 2021 14:01:56 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54324) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTT2b-0006iw-72; Thu, 23 Sep 2021 14:01:49 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4508 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTT2Z-0004ln-Qh; Thu, 23 Sep 2021 14:01:49 -0400 In-Reply-To: <878rznrxm6.fsf@Rainer.invalid> (message from Achim Gratz on Thu, 23 Sep 2021 19:49:05 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:215215 Archived-At: > From: Achim Gratz > Date: Thu, 23 Sep 2021 19:49:05 +0200 > > Eli Zaretskii writes: > >> We still need to do something for 64-bit Cygwin. Even though address collisions > >> are unlikely they could still happen theoretically. But there might be a much > >> easier solution that doesn't necessarily require rebasing. For example, Achim > >> mentioned earlier the possibility of marking the eln as ASLR w/ high-entropy and > >> large address aware. > > > > Isn't that the default of the 64-bit GNU ld on Windows? Or does > > Cygwin configure Binutils differently from MinGW? > > No, I've had to remove that default since obviously it doesn't work on > Cygwin. You mean, ASLR doesn't work with Cygwin because it must use the same address in the forked process? But then why did Ken say that ASLR and High Entropy could solve the problem with the *.eln files -- isn't that the same problem? > > If not, we can use native-comp-driver-options, by giving it a non-nil > > value for Cygwin, to force this. > > All that would be needed, on 64bit at least, is a tiny bit more control > over how ASLR works, but there isn't even proper documentation about > what it actually does (that I can find anyway). M$ must have solved > that problem for WSL1, but whatever it was, it didn't make it to the NT > subsystem. Sorry, I don't understand. My suggestion was, if you need to make the *.eln files be marked as ASLR with High Entropy, to use a variable we have for this purpose, it will force the linker to produce *.eln files with these bits set in the PE+ header. What other control do you need for your purposes, or what am I missing?