From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web08.20976.1622965231682204492 for ; Sun, 06 Jun 2021 00:40:32 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([101.224.112.124]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Sun, 06 Jun 2021 15:40:27 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 101.224.112.124 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: "'Leif Lindholm'" , Cc: "'Ray Ni'" , "'Bob Feng'" References: <20210605011854.1938-1-gaoliming@byosoft.com.cn> <20210605185242.on4qvuotv5tib7ic@leviathan> In-Reply-To: <20210605185242.on4qvuotv5tib7ic@leviathan> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIDEvMV0gQmFzZVRvb2xzIEdlbkZ3OiBGaXggcmVncmVzc2lvbiBpc3N1ZSB0byBjb252ZXJ0IHRoZSBpbWFnZSB0byBBQ1BJIGRhdGE=?= Date: Sun, 6 Jun 2021 15:40:28 +0800 Message-ID: <001a01d75aa7$39175e30$ab461a90$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQKngEFrtUQmVheN/c7oAFzToAISIQK/cvP+qVBSFXA= Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Leif and Bob: Thanks for your test and review. I create PR https://github.com/tianocore/edk2/pull/1690 for this patch.=20 Thanks Liming > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: Leif Lindholm > =B7=A2=CB=CD=CA=B1=BC=E4: 2021=C4=EA6=D4=C26=C8=D5 2:53 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io; gaoliming@byosoft.com.cn > =B3=AD=CB=CD: Ray Ni ; Bob Feng > =D6=F7=CC=E2: Re: [edk2-devel] [PATCH 1/1] BaseTools GenFw: Fix regressi= on issue to > convert the image to ACPI data >=20 > Hi Liming, >=20 > On Sat, Jun 05, 2021 at 09:18:54 +0800, gaoliming wrote: > > With GCC49 tool chain, aslc file is compiled into elf image. > > But, its text section has no CODE attribute. So, it can't be detected > > by new GenFw tool.For this type file. its text section is not required= . > > Its data section will be converted to acpi table. > > > > This fix is to remove assert check when the generated image is ACPI data. >=20 > Note - this does not only affect GCC49: it also affects at least > GCC5 and CLANG38. This patch resolves the issue. >=20 > Tested-by: Leif Lindholm (GCC49, GCC5, CLANG38) >=20 > Thanks! >=20 > / > Leif >=20 > > Signed-off-by: Liming Gao > > Cc: Ray Ni > > Cc: Leif Lindholm > > Cc: Bob Feng > > --- > > This patch has been verified on GCC49 for AARCH64 platform. > > > > BaseTools/Source/C/GenFw/Elf32Convert.c | 2 +- > > BaseTools/Source/C/GenFw/Elf64Convert.c | 2 +- > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c > b/BaseTools/Source/C/GenFw/Elf32Convert.c > > index 7c8a065678ac..314f8233234d 100644 > > --- a/BaseTools/Source/C/GenFw/Elf32Convert.c > > +++ b/BaseTools/Source/C/GenFw/Elf32Convert.c > > @@ -435,7 +435,7 @@ ScanSections32 ( > > } > > } > > > > - if (!FoundSection) { > > + if (!FoundSection && mOutImageType !=3D FW_ACPI_IMAGE) { > > Error (NULL, 0, 3000, "Invalid", "Did not find any '.text' sectio= n. "); > > assert (FALSE); > > } > > diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c > b/BaseTools/Source/C/GenFw/Elf64Convert.c > > index 8fe672e98448..8b09db7b690b 100644 > > --- a/BaseTools/Source/C/GenFw/Elf64Convert.c > > +++ b/BaseTools/Source/C/GenFw/Elf64Convert.c > > @@ -714,7 +714,7 @@ ScanSections64 ( > > } > > } > > > > - if (!FoundSection) { > > + if (!FoundSection && mOutImageType !=3D FW_ACPI_IMAGE) { > > Error (NULL, 0, 3000, "Invalid", "Did not find any '.text' sectio= n. "); > > assert (FALSE); > > } > > -- > > 2.27.0.windows.1 > > > > > > > > > >=20 > > > >