From patchwork Tue Sep 14 20:15:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 64743 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7F2F2B6EEB for ; Wed, 15 Sep 2010 06:16:50 +1000 (EST) Received: from localhost ([127.0.0.1]:37777 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ovbvq-0001Zk-QA for incoming@patchwork.ozlabs.org; Tue, 14 Sep 2010 16:16:46 -0400 Received: from [140.186.70.92] (port=36277 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OvbvH-0001Zf-37 for qemu-devel@nongnu.org; Tue, 14 Sep 2010 16:16:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OvbvF-0006cb-RS for qemu-devel@nongnu.org; Tue, 14 Sep 2010 16:16:11 -0400 Received: from mail-qy0-f180.google.com ([209.85.216.180]:37764) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OvbvF-0006cW-NR for qemu-devel@nongnu.org; Tue, 14 Sep 2010 16:16:09 -0400 Received: by qyk31 with SMTP id 31so6691230qyk.4 for ; Tue, 14 Sep 2010 13:16:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=aDvotKHCGmF8xEeAQ7u4IjPMyxwSh++20QXVxfI0fcs=; b=asSy33reyz5b51lMHgLZtARLnEnESV3KsT7mLJb7owcSp6PD3RPlBSxcivcYFBhWdf rHjtEYQj1PSfxNmzKF18wcWEcKLL49OXT0POHq5eeG6Urnk2warzyURCUZ61PBuZM3Y6 Zaj7GM9OU9xBcyBmYamogX2JJgQjyoHPe8YGY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=I/98xgIOd7F33a8AqzlHtF3EeprSapwu2u+W8yvNvOz2MA8Iic4UY/i9BU9qDQLYC8 ssZAYmetYRYF70MhSYOS+IMk16eTNv8rkXH2EoGcQx9tqXb2DiNsI460bLAympeJyaYa 3OG8htnqAL2XxVaFiTCie0y2+nIF+Kwb3B9mE= Received: by 10.224.71.151 with SMTP id h23mr326607qaj.219.1284495368776; Tue, 14 Sep 2010 13:16:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.240.135 with HTTP; Tue, 14 Sep 2010 13:15:40 -0700 (PDT) From: Blue Swirl Date: Tue, 14 Sep 2010 20:15:40 +0000 Message-ID: To: qemu-devel X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH, RFT] mingw32: use ASLR, no-SEH and DEP if available X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org If the linker supports the flags --dynamicbase, --no-seh, or --nxcompat, use them. Signed-off-by: Blue Swirl --- This may create compatibility problems with XP. Testers wanted. No change seen with Wine. --- configure | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 4061cb7..26f5465 100755 --- a/configure +++ b/configure @@ -2138,6 +2138,15 @@ if test "$solaris" = "no" ; then fi fi +# Use ASLR, no-SEH and DEP if available +if test "$mingw32" = "yes" ; then + for flag in --dynamicbase --no-seh --nxcompat; do + if $ld --help 2>/dev/null | grep ".$flag" >/dev/null 2>/dev/null ; then + LDFLAGS="-Wl,$flag $LDFLAGS" + fi + done +fi + confdir=$sysconfdir$confsuffix tools=