From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by sourceware.org (Postfix) with ESMTPS id F228C38582AD for ; Sun, 30 Oct 2022 07:07:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F228C38582AD Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=martin.st Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=martin.st Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 29U76x6K007089-29U76x6L007089; Sun, 30 Oct 2022 09:07:00 +0200 Received: from foo.martin.st (host-97-187.parnet.fi [77.234.97.187]) by mail9.parnet.fi (Postfix) with ESMTPS id 3BE09A1445; Sun, 30 Oct 2022 09:06:58 +0200 (EET) Date: Sun, 30 Oct 2022 09:06:58 +0200 (EET) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: mingw-w64-public@lists.sourceforge.net cc: binutils@sourceware.org, gcc@gcc.gnu.org Subject: Re: [Mingw-w64-public] Problems when building NT kernel drivers with GCC / LD In-Reply-To: <20221030000611.ytfadi4f2xcvodey@pali> Message-ID: <4c814dba-6383-b2b3-e2fc-35a89c78acbf@martin.st> References: <20221030000611.ytfadi4f2xcvodey@pali> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1890794670-1667113619=:1659" X-FE-Policy-ID: 3:14:2:SYSTEM X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1890794670-1667113619=:1659 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8BIT On Sun, 30 Oct 2022, Pali Rohár wrote: > * LD --dynamicbase is not working correctly. If used for PE executables > (not dynamic libraries) then it does *not* generate relocation info. > And without relocation info in PE binary, it is not possible to > relocate base address. Which makes dynamic base non-working. I don't know about the rest, but this one sounds familiar to me. But IIRC this one was fixed semi-recently (1-2 years ago), while making --dynamicbase the default. I think it was fixed in this binutils commit: commit 514b4e191d5f46de8e142fe216e677a35fa9c4bb Author: Jeremy Drake Date: Thu Aug 27 12:58:27 2020 +0100 Change the default characteristics of DLLs built by the linker to more secure settings. This commit is included in binutils 2.36 and later. // Martin --8323329-1890794670-1667113619=:1659--