From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id E90DE3858D37 for ; Sun, 30 Oct 2022 19:58:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E90DE3858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-x329.google.com with SMTP id b20-20020a05600c4e1400b003cc28585e2fso6945553wmq.1 for ; Sun, 30 Oct 2022 12:58:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=rdthx2hsaspMe5dMDF9FFJEUFNA6y0AedSyX8D8c51k=; b=RClZQcrtg5FerbAjI35jm812ewlumrLg/t+zfWarazP2eKKKg64HDLGDy9jvo2jBTE E4S4xrLyMRBojGqjQkZOE1xWKQA5lU5vzvXFi2cuLGpGaiAXXIvFk2KgfSpLPEty4BaX 5ehLRGP9I/jMLGXSLpD0PMKTdbjzs8SkgiWj54L/QCzK2ZqT+U+DkozUa0uR5uZMUOHp MK7y/Wd+5eVZ2x6/tFkn3wtTxzoL6sGd307IhA4ldMFx9EosfhF0RFckMhe4qRqXnggy eFccYYojUXfKb+aqGwH0Obcy4zcceHWj3C9yhqRr2oJ+GpufYlbyWbOK8tTCAzWK5MJQ LaiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rdthx2hsaspMe5dMDF9FFJEUFNA6y0AedSyX8D8c51k=; b=K12ZOJ2h4xZbiAysCk897N3XZkPMBDk3C9AaV5ihLhV6c/FYoh3VbT2g21wtq5A3ub Eyk3tnrw+ob1fD0BdW0JJ8hbZf/5kMB7OtxUqwoTSn9aYtpXmDwNTEgJ3t24IIY8P0Rd 0QyQgDEU38FXLuteEdRZ2R7VmtuHmVTJKPu1VOpii7dZXeaZYsiPDvoLLLYoNiLKUIMS xOrr/HnMnLth61W9TWQODO3szxNa2633t02o2/EQZCGhrP/YfGXI4SougzE0PL310fVv 3NJB0d9sXBjj8ToL6/fOUwDXQsYFeR/hKRHGZoDG/K6blqZcCdJRI0q1Nkm82gb7E7t/ 6EeQ== X-Gm-Message-State: ACrzQf1iEbOINAyvEfJ4ftJvXrGASuHMnS3Ky/KXv2XplTmyQsaCxl4D yQUN0O3ix9Wccz9MI1Hi2XM= X-Google-Smtp-Source: AMsMyM6Tk5vpeaxiV+CI1q5umgZqdz01tQCFUtIZwg3G8IhoMgShZ2Plzy55dNBdaBtBQdOHVEntBA== X-Received: by 2002:a05:600c:3b22:b0:3cf:5eff:c858 with SMTP id m34-20020a05600c3b2200b003cf5effc858mr5814960wms.193.1667159922515; Sun, 30 Oct 2022 12:58:42 -0700 (PDT) Received: from [192.168.87.121] (3e6bc644.rev.stofanet.dk. [62.107.198.68]) by smtp.gmail.com with ESMTPSA id v11-20020a05600c444b00b003c70191f267sm5208337wmn.39.2022.10.30.12.58.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 30 Oct 2022 12:58:41 -0700 (PDT) Message-ID: <67372f0f-3298-8f3d-fbce-c709ff487d0c@gmail.com> Date: Sun, 30 Oct 2022 20:58:39 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [Mingw-w64-public] Problems when building NT kernel drivers with GCC / LD To: mingw-w64-public@lists.sourceforge.net, =?UTF-8?Q?Martin_Storsj=c3=b6?= Cc: gcc@gcc.gnu.org, binutils@sourceware.org References: <20221030000611.ytfadi4f2xcvodey@pali> <4c814dba-6383-b2b3-e2fc-35a89c78acbf@martin.st> Content-Language: da From: ralph engels In-Reply-To: <4c814dba-6383-b2b3-e2fc-35a89c78acbf@martin.st> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,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: i think most of it stems from binutils tools being geared towards linux driver development ? and since noone before has shown much interrest in developing drivers for windows using the gnu tools. I also think that there might be some pitfalls -> incompatible exception models for one (most mingw based compilers today use dwarf unwinders for 32 bit maybe a few who use sjlj) the problem with that is that atleast 32 bit windows cannot do anything with this exception model sjlj is a little better in that regard but still. If done in pure C or asm it could work if those options were avaliable but it does limit the scope i think. Den 30-10-2022 kl. 08:06 skrev Martin Storsjö: > 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 > > _______________________________________________ > Mingw-w64-public mailing list > Mingw-w64-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public