From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id 60FA5385840D for ; Sat, 5 Nov 2022 01:26:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 60FA5385840D 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-ej1-x630.google.com with SMTP id y14so17389621ejd.9 for ; Fri, 04 Nov 2022 18:26:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=PSW4GeMyJ8s4xxUaNFKY66I5Pf7tWsB8PQufqEOmyaY=; b=inoH08jdlMOyTRTCKThfgScSP0AHe/PpJsKIS1PViDdOT9AxGfLh79DszzjicH4jeM d0ii0/yejga4YDMTEpE09YHV8jAiO3yG0y4mVTPMo6H5C8h8kTaAJOvwQXhIBUte6s4E d6VggX3C79gfVBHjWivVbrcONBj80ysMhbrde2v5hugaxJsprVaB0hu7mnNG4EnDv7Vg wJXbgq1BjOngfUYNzLTfPBjVhmyoqByvl2m2KhgSzzDJ3R2xDCpH/6y8yWn/PJMewiFl aS4S3Kgifwk/1xD/MzuFKOFSlt6h2w6rg3oLUilG5GkE45ICdtBum6kctLV1gdqhbLEx ysBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PSW4GeMyJ8s4xxUaNFKY66I5Pf7tWsB8PQufqEOmyaY=; b=49voNpYKVHOToEmC1UzRsIP7vRFb2Xdzyw/MHmfRV6jYrqtVPv1sUsB8fYeJpalPXK 3spK6+0QsQGyXlcLfx+DlO9VtwFSs9Hkk97+7LLqb4ZjQqlhGINmtL7MV+zIrscNGbVf hLvSoaI3nPlnRztkCXLjinFIFvRcKIwmTusuftmLzifWtTrRvAFMdHpelOms8oN3MPxY plAWgrrz+OV1l4aoy+a4vRvYxso9DSLNVuFvWBCIdSwdCsbhacrL/ywyef17oraEVlLT DD3+dTgupRI+12ygE3WwC/NMoHQNMRz8TpsoE7uudRnQqVAguoz5ppIqM5YBOjDurkkA Upsg== X-Gm-Message-State: ACrzQf0RfWAIes2Oi0e3fw0sYVR1UWtBghIQdPs6HuoKMSb6kMK8iPAw bnTbeQ67VUMHnMWXxiQg3oE= X-Google-Smtp-Source: AMsMyM76LDWuKuR4FLHfqu4OIMRT0DmBO/o4GQbAtkzwEMl4gPkS/+2mca5ePrlsQGPvTqwAblbLlg== X-Received: by 2002:a17:907:c0e:b0:7ae:1134:37c5 with SMTP id ga14-20020a1709070c0e00b007ae113437c5mr12779524ejc.648.1667611614233; Fri, 04 Nov 2022 18:26:54 -0700 (PDT) Received: from pali ([2a02:2b88:6:5cc6::2f]) by smtp.gmail.com with ESMTPSA id b25-20020a170906039900b007abafe43c3bsm246920eja.86.2022.11.04.18.26.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 18:26:53 -0700 (PDT) Date: Sat, 5 Nov 2022 02:26:52 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Jan Beulich Cc: binutils@sourceware.org, gcc@gcc.gnu.org, mingw-w64-public@lists.sourceforge.net Subject: Re: Problems when building NT kernel drivers with GCC / LD Message-ID: <20221105012652.e4x5xm7lhrd4rgbn@pali> References: <20221030000611.ytfadi4f2xcvodey@pali> <9c878a09-fd84-325c-771a-65d88aff7282@suse.com> <20221105005749.3ultigucvhqoikvx@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221105005749.3ultigucvhqoikvx@pali> User-Agent: NeoMutt/20180716 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,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: On Saturday 05 November 2022 01:57:49 Pali Rohár wrote: > On Monday 31 October 2022 10:55:59 Jan Beulich wrote: > > On 30.10.2022 02:06, Pali Rohár via Binutils wrote: > > > * GCC or LD (not sure who) sets memory alignment characteristics > > > (IMAGE_SCN_ALIGN_MASK) into the sections of PE executable binary. > > > These characteristics should be only in COFF object files, not > > > executable binaries. Specially they should not be in NT kernel > > > drivers. > > > > Like Martin pointed out in reply for another item, I'm pretty sure > > this one was taken care of in bfd already (and iirc is in 2.39). You > > fail to mention at all what versions of the various components you > > use. > > Ou, sorry for that. I take care to write issues in all details and > totally forgot to write such important information like tool versions. > > Now I retested all issues on Debian 11 which has LD 2.35.2 and GCC > 10.2.1 and all issues are there still valid except data characteristic > IMAGE_SCN_CNT_INITIALIZED_DATA for code sections IMAGE_SCN_CNT_CODE. > > I can easily retest it with LD 2.39 and GCC 10.3.0 which is in Debian > testing. Retested with LD 2.39 and GCC 10.3.0 which is in Debian testing and following problems are additionally fixed: --exclude-all-symbols, --dynamicbase and IMAGE_SCN_ALIGN_MASK (which you mentioned above). All other still reminds. Do you need some other information? > > I guess before reporting such a long list of issue you would > > have wanted to test at least with the most recent releases of each > > of the involved components. I wouldn't exclude some further items > > could then be scratched off your list. > > > > Jan