From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web08.37234.1623079138667827825 for ; Mon, 07 Jun 2021 08:18:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=eswm9c+P; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623079137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8RaHEQwsJdK281YreRCqzi5BDi8AxV1rAs5a6v+XjRE=; b=eswm9c+PmmP4LGPSuR7tl+M9vRcu0kzGqRPL6u6KUNeSDTRFZZHFdEPhVfOoQIVY5+NqBz KS063RFT8h6hEWcOcCdkntddXqpG5892jtyxitl2mybdrlDLZHqZ6bL1IAEvqcsNASEB6I V+i+ZKcuu6Ya71ADUm4/sZ/Q/7//Uf8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-482-t-_5fK9kNe-NUgzbg-YfNw-1; Mon, 07 Jun 2021 11:18:56 -0400 X-MC-Unique: t-_5fK9kNe-NUgzbg-YfNw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2A036800D55; Mon, 7 Jun 2021 15:18:55 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-75.ams2.redhat.com [10.36.114.75]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BE6B25D9C0; Mon, 7 Jun 2021 15:18:52 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools GenFw: Fix regression issue to convert the image to ACPI data To: devel@edk2.groups.io, gaoliming@byosoft.com.cn Cc: Ray Ni , Leif Lindholm , Bob Feng References: <20210605011854.1938-1-gaoliming@byosoft.com.cn> From: "Laszlo Ersek" Message-ID: <29306b7e-eee2-d858-fd9c-0480dfc89cf3@redhat.com> Date: Mon, 7 Jun 2021 17:18:51 +0200 MIME-Version: 1.0 In-Reply-To: <20210605011854.1938-1-gaoliming@byosoft.com.cn> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 06/05/21 03:18, 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. > > 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(-) If this is a regression, then the commit message should please identify the commit that introduced the regression. We usually do this with: Fixes: .... Thanks Laszlo > > 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 != FW_ACPI_IMAGE) { > Error (NULL, 0, 3000, "Invalid", "Did not find any '.text' section."); > 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 != FW_ACPI_IMAGE) { > Error (NULL, 0, 3000, "Invalid", "Did not find any '.text' section."); > assert (FALSE); > } >