From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mx.groups.io with SMTP id smtpd.web09.15591.1622919166079755344 for ; Sat, 05 Jun 2021 11:52:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=zj42X3tu; spf=pass (domain: nuviainc.com, ip: 209.85.221.48, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f48.google.com with SMTP id c5so12607762wrq.9 for ; Sat, 05 Jun 2021 11:52:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=+nr5f3/LJ6TXduYi4KyZhlEqmw9dmlHlBoRyu+4eOOM=; b=zj42X3tuNkOMUaH7iu+FLRms5I52xxjokcHtBChisrUDIxmPoZg6Mb3MHA9Uv9hFV2 Xu9ABCw6Cl9Qoscsd0fgadRcnezPRwNTwZwh8qN7jwRL6qx6ke3asqnCaDGKvjSOMu2E FTkspjz2r5BiTDKmSiPbdXz3EAQkCcL8gO4YDU626qPXNzAKxJBSQ57wKAe+OfKNAkrT KAH7pb1PX2u/eF5RTZXdVJG2604iIS6iSAOvBHvpB2jdwyssy7gVQILwCuYDiRzDyUXk AoxxqfHfW0oLAFmf/IQXpEx+wZk9/gfEZkql/tqpDeqfn/zzGtyoRMhxBnnuR6h0RC06 ZTsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=+nr5f3/LJ6TXduYi4KyZhlEqmw9dmlHlBoRyu+4eOOM=; b=NX10Sf1Dxd8tjyXVLVA9ZCas+zCe/WCyj2FwvOeixYAcOuJ2Uip4t4+2300DKJilxP nwJVJ0z6gymgM/51c+4VPGUm31t4twg684IS1LwN58IQYjSWydfl+z2oUA99HN48AbzU RjZA2T1vXSfa66+KXXLbKpYJbgsIGbgLrJCh0i3irJNdMrSz/JXHqCaKjNvu0BngCA5t JazE8kstE4g0/J7VjIqhF3lntYoF8bYMvVhIYGGFkQnH6e5IEKoHObKf9Z6Hr5bcy99w 79+mtiSl0u9ncOv3Wm+JqYuXB4bJ5MFwrenYSw3HVmcZT++uRFG/9I6k06svUmDl6Wj5 mXJQ== X-Gm-Message-State: AOAM5322+QJMX+8xvqF5zQ1CZFOMMe0lVvIjN71YhpOcSz/kQBW3vxIA 0G1E8edG3SxDp7TyslIm6BCq00RsCJIh0wv8DtT/HfKU3QzTyDVO+JS8Qr+Zs8SLlgSZiAaz57n dUbwKFVC+6lE7lLgll3VOB5kfB0R+z+3QFC3s5EQL/EWW3iaQ8TJrf77gpj6+MsEpXA== X-Google-Smtp-Source: ABdhPJwZrvHhCopi2WJ1cXDKUbykCU/D8ezcK31vB7y2oWM4HmF2OuNXljRE1/bybHBY0hFMnzowAA== X-Received: by 2002:a05:6000:154c:: with SMTP id 12mr6946370wry.126.1622919164376; Sat, 05 Jun 2021 11:52:44 -0700 (PDT) Return-Path: Received: from leviathan (cpc1-cmbg19-2-0-cust915.5-4.cable.virginm.net. [82.27.183.148]) by smtp.gmail.com with ESMTPSA id n2sm10688630wmb.32.2021.06.05.11.52.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Jun 2021 11:52:43 -0700 (PDT) Date: Sat, 5 Jun 2021 19:52:42 +0100 From: "Leif Lindholm" To: devel@edk2.groups.io, gaoliming@byosoft.com.cn Cc: Ray Ni , Bob Feng Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools GenFw: Fix regression issue to convert the image to ACPI data Message-ID: <20210605185242.on4qvuotv5tib7ic@leviathan> References: <20210605011854.1938-1-gaoliming@byosoft.com.cn> MIME-Version: 1.0 In-Reply-To: <20210605011854.1938-1-gaoliming@byosoft.com.cn> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Liming, 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. Note - this does not only affect GCC49: it also affects at least GCC5 and CLANG38. This patch resolves the issue. Tested-by: Leif Lindholm (GCC49, GCC5, CLANG38) Thanks! / Leif > 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 != 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); > } > -- > 2.27.0.windows.1 > > > > > > >