public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, gaoliming@byosoft.com.cn
Cc: Ray Ni <ray.ni@intel.com>, Leif Lindholm <leif@nuviainc.com>,
	Bob Feng <bob.c.feng@intel.com>
Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools GenFw: Fix regression issue to convert the image to ACPI data
Date: Mon, 7 Jun 2021 17:18:51 +0200	[thread overview]
Message-ID: <29306b7e-eee2-d858-fd9c-0480dfc89cf3@redhat.com> (raw)
In-Reply-To: <20210605011854.1938-1-gaoliming@byosoft.com.cn>

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 <gaoliming@byosoft.com.cn>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Bob Feng <bob.c.feng@intel.com>
> ---
>  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);
>    }
> 


  parent reply	other threads:[~2021-06-07 15:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-05  1:18 [PATCH 1/1] BaseTools GenFw: Fix regression issue to convert the image to ACPI data gaoliming
2021-06-05  1:30 ` [edk2-devel] " Ni, Ray
2021-06-05  5:05 ` Bob Feng
2021-06-05 18:52 ` Leif Lindholm
2021-06-06  7:40   ` 回复: " gaoliming
2021-06-07 15:18 ` Laszlo Ersek [this message]
2021-06-08  1:19   ` gaoliming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=29306b7e-eee2-d858-fd9c-0480dfc89cf3@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox