From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web11.3986.1623825435272478999 for ; Tue, 15 Jun 2021 23:37:15 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=zQB/9Y92; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: bob.c.feng@intel.com) IronPort-SDR: iaJU4N/dSFCmgmOdhhWzU99BoVKSkiH3Y9a3YsOTgS+U63tzztIkwFQdxkP0bzt5ZABkRL5iix RtRh77crffbg== X-IronPort-AV: E=McAfee;i="6200,9189,10016"; a="204294966" X-IronPort-AV: E=Sophos;i="5.83,277,1616482800"; d="scan'208";a="204294966" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2021 23:37:12 -0700 IronPort-SDR: BkvLdyBb1rWPqRNjxgGywKFB+XZQE6Y9xbRUoE99hdvIUojp1l82TD01w+e8gSj0G28C1TUvKj 7YI53u3s6dOA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,277,1616482800"; d="scan'208";a="415634490" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga007.fm.intel.com with ESMTP; 15 Jun 2021 23:37:12 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Tue, 15 Jun 2021 23:37:12 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Tue, 15 Jun 2021 23:37:11 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4 via Frontend Transport; Tue, 15 Jun 2021 23:37:11 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.176) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.4; Tue, 15 Jun 2021 23:36:54 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a6Nwezix0iBRYPODCdmaVUuAUgPsSlZqxKb158LaWQ1zSjO4IRLYrS839dzRxhPuOLjKogoLyyvlMNohHyfq9pKeIfEZShDZ7qcU8b4LygI/UdcWQ7OyPUMJI0kvydumLruAbYC+opX7a8Xx/rmIOnvhL+nE9kJuCqfcPrup3hNmra703hqYS0ViYTrZGrczWETvPkRzDKK+CQ+4g5xd+vhi22R4JvllbSIrlaKmMrxlgTbrX1+2XJGgSuWHH4opX+9jE99BCXAFIe+EFWWSluOI1dPJLl3HeHdwWpLd3CAxWVKs4FVnUaF5pYye2+toujb2HrRgntfo3pJ3EXaeeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4StFVg4ULeinpSZlK2q/6Ul+IEzIk33spZ8E1DL3lo0=; b=n7Nwo0poTDR3dsfSlLVOMX5NnCIM6c2gN15FjW5fgK+YCaNnWjTVFbp9QfENu+wgTuEnB18J59WThx1wja/4BXsKhz13qybgshryMgE9M0ZCQ9i9ziHtViccu0JzoK9rYLBjZizdgAlRwTlsRKZaqLhlZVC1XmderSh1PTDNERATPS57Em9G2rRIzm55JqNIOEgFuyRjpjqfLu4DMtLe+CeNj5I5g+XxmyoyJ9WvsGAlXiry4B4VKE+gISo1He8EWeBXObE1FQhVXI68mq4GG0hTNlc8HxbwfmmDH0+KNiyAnJQys3M2fryXvoir1B4oZkcXT6SZ7YYOP0Gvu4t2dA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4StFVg4ULeinpSZlK2q/6Ul+IEzIk33spZ8E1DL3lo0=; b=zQB/9Y92AikAyT6EYQUMWiNU2sI1MqyVDZhNVZI1CUeRrsiyVNBjcYHwQGHqcv6dcQHYpKfryrTZb/NELP6uIt7t5WSBPnhoBbJTq62S8a0TnSShJMAzQUdEjJmQEiO8WsZBxWdwvDFuZfZ8kj1a7wNhfrhsUp2FcCz3OxiHEKQ= Received: from DM6PR11MB4073.namprd11.prod.outlook.com (2603:10b6:5:19f::22) by DM6PR11MB4739.namprd11.prod.outlook.com (2603:10b6:5:2a0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.22; Wed, 16 Jun 2021 06:36:53 +0000 Received: from DM6PR11MB4073.namprd11.prod.outlook.com ([fe80::585b:8bbc:602e:fb36]) by DM6PR11MB4073.namprd11.prod.outlook.com ([fe80::585b:8bbc:602e:fb36%5]) with mapi id 15.20.4219.026; Wed, 16 Jun 2021 06:36:53 +0000 From: "Bob Feng" To: "devel@edk2.groups.io" , "Feng, Bob C" , Liming Gao CC: "Ni, Ray" Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools GenFw: Keep read only alloc section as text section when convert ELF Thread-Topic: [edk2-devel] [PATCH 1/1] BaseTools GenFw: Keep read only alloc section as text section when convert ELF Thread-Index: AQHXXRc3Hyf7+yrmzkqP1jtUecwL1asUqsKwgAGOyeA= Date: Wed, 16 Jun 2021 06:36:53 +0000 Message-ID: References: <20210609100628.1072-1-gaoliming@byosoft.com.cn> <1688AEB31359F37C.24110@groups.io> In-Reply-To: <1688AEB31359F37C.24110@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.51] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fabf50df-77a8-4227-5742-08d93091216c x-ms-traffictypediagnostic: DM6PR11MB4739: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xV2PKodxQ49RRFRfs8FvL/m2l7pPDIxGZIG9fFHAvGQfsKwGdvzzX0a1HWak26OPWTqCpKTWtssXbZfhzE6w9LXjtG/WAf21wY1A+yqT9Vsb7244kzB2zZS8gnICbv5L0/Av1IOvieyQPrWAUrI0oKvGIgOghtxPKpuMgVrGi4WBCX0ylmqLqkHZAA0mnyB64fXlQrs2FVbQsvGPUcnDvUU8WqKJUSpx5s/s6RVZdNL0f153fO1+CObkH39N01J9/echxlEJtuqbVbkfxcf4qA4/3laKfAnqSITO6lkP6rP0wwl0hQp2m4PyVHZLbFDb02fq5f5iIqg4lmKxQnUZRD7/840drNaM+FHyjWXiJd8gkcjDhPD7eMNFHXo/MM6d1LjA3dHYg5mt54ujwEQApf80TBg7RU+Y/ItWsMvjFBmu4mqnOn+LS5LCYJO9B1o0U7xHr9nC1eiqN9TEHUwwjD7qvy+45I+7FEHl9pQ7rNnNhRqHUq80BfqUEVeNZXlytylq8Wy8ev8XS7+GgQuho5+1so23nQfKrFyN/+j9Uo6ApCnFIvhK2UH7c3NUtJdF6gF4KYeXW30OsyOQkclSOXsWM0gTMN757u81Rqizg+0QaqbmiUY2O4QKrHRpsjdGn8ls9md6sgdTgyV8phLJxo5uQwRcJem8lH11WlUMy7KrWuLqpMUjnJKPLJFGRaVuhmh9vLNzSS2me4MTsT4siV2snKiq1FwNbSiVXWxZve/sjXwMA/Ujg5gNHnI5YCnd9SSzec5XostIo449mB4zGg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4073.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(346002)(396003)(366004)(376002)(39860400002)(136003)(9686003)(66446008)(55016002)(66476007)(64756008)(66556008)(83380400001)(8936002)(86362001)(76116006)(8676002)(110136005)(66946007)(4326008)(316002)(107886003)(6506007)(53546011)(478600001)(38100700002)(5660300002)(122000001)(7696005)(186003)(52536014)(966005)(19627235002)(33656002)(2906002)(71200400001)(26005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?qUwwFzURCUF4nFAtQfrwChND8t9qKNdZteIUHtcsUBzihUqQ8p75VdiqSUfz?= =?us-ascii?Q?OS0CYj8exKcS7Lv32mguAE1+Zkx6oW8XYFxMYiuhGIenDdi4jaqhRm7et2tr?= =?us-ascii?Q?oyRhxuc2bWLPK8j1/CHD5oE1CtbHlPvVsr600MO+GsWVKLmH8ff/KWqzEtaJ?= =?us-ascii?Q?3WUNAh+yvJg/IWPMiR2a4F9erHz/SE58jD1z+OK/GvD8Xo8y9PeselzF1lF4?= =?us-ascii?Q?f1P1RALkgUkVHg9NCOUdYhHBbLfWZq9Y2WxJObKM23NkNeI1E56lzpmPLLo9?= =?us-ascii?Q?cp2s+tKnmxtGCC6/SURKe9PJ4NMr2eQcCmLfrkoz4uQm1356mMhUv3bx7Eno?= =?us-ascii?Q?DpeA88ChWFmbTJqk/54LlmcMzguGwn/maIdZIRM26dWe1L9IhqJchvvK4F/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uOi18TEAIKM6FPH2+OV1nhoOw/?= =?us-ascii?Q?ysPQ20TdeLe1zNcGR97n/TCp?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4073.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fabf50df-77a8-4227-5742-08d93091216c X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Jun 2021 06:36:53.7626 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: uI7lI2avaloeR6ant/bIDvSJYMJys62JdGeLnX2B8ay77MohlXuM7xsNBgMKGdXC447drZnlXLchHZewtxO2Lw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4739 Return-Path: bob.c.feng@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Liming, There are some warning reported from PatchCheck.py, would you update the c= ommit message? Thanks, Bob -----Original Message----- From: devel@edk2.groups.io On Behalf Of Bob Feng Sent: Tuesday, June 15, 2021 2:49 PM To: Liming Gao ; devel@edk2.groups.io Cc: Ni, Ray Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools GenFw: Keep read only allo= c section as text section when convert ELF Reviewed-by: Bob Feng -----Original Message----- From: Liming Gao Sent: Wednesday, June 9, 2021 6:06 PM To: devel@edk2.groups.io Cc: Feng, Bob C ; Ni, Ray Subject: [PATCH 1/1] BaseTools GenFw: Keep read only alloc section as text= section when convert ELF This is the fix of the regression issue at c6b872c6. Based on ELF spec, readonly alloc section is .rodata section. It is requri= ed. This fix is to add back original check logic for ELF section. Now, the rea= donly alloc section and execute alloc section are regarded as .text section= . Signed-off-by: Liming Gao Cc: Bob Feng Cc: Ray Ni --- With this fix, previous fix commit ec1cffd9 is not required. But, the che= cker added by commit ec1cffd9 is correct for ACPI data conversion. So, I d= on't plan to revert it. BaseTools/Source/C/GenFw/Elf32Convert.c | 3 ++- BaseTools/Source/C/GenFw= /Elf64Convert.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c b/BaseTools/Source/C/= GenFw/Elf32Convert.c index 314f8233234d..d917a444c82d 100644 --- a/BaseTools/Source/C/GenFw/Elf32Convert.c +++ b/BaseTools/Source/C/GenFw/Elf32Convert.c @@ -238,7 +238,8 @@ IsTextShdr ( Elf_Shdr *Shdr ) { - return (BOOLEAN) ((Shdr->sh_flags & (SHF_EXECINSTR | SHF_ALLOC)) =3D=3D= (SHF_EXECINSTR | SHF_ALLOC)); + return (BOOLEAN) (((Shdr->sh_flags & (SHF_EXECINSTR | SHF_ALLOC)) =3D= =3D (SHF_EXECINSTR | SHF_ALLOC)) || + ((Shdr->sh_flags & (SHF_WRITE | SHF_ALLOC)) =3D=3D=20 + SHF_ALLOC)); } =20 STATIC diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/= GenFw/Elf64Convert.c index 8b09db7b690b..33031ec8f6e7 100644 --- a/BaseTools/Source/C/GenFw/Elf64Convert.c +++ b/BaseTools/Source/C/GenFw/Elf64Convert.c @@ -246,7 +246,8 @@ IsTextShdr ( Elf_Shdr *Shdr ) { - return (BOOLEAN) ((Shdr->sh_flags & (SHF_EXECINSTR | SHF_ALLOC)) =3D=3D= (SHF_EXECINSTR | SHF_ALLOC)); + return (BOOLEAN) (((Shdr->sh_flags & (SHF_EXECINSTR | SHF_ALLOC)) =3D= =3D (SHF_EXECINSTR | SHF_ALLOC)) || + ((Shdr->sh_flags & (SHF_WRITE | SHF_ALLOC)) =3D=3D=20 + SHF_ALLOC)); } =20 STATIC -- 2.27.0.windows.1