[edk2-devel] [PATCH 1/1] BaseTools GenFw: Fix regression issue to convert the image to ACPI data

Ni, Ray ray.ni at intel.com
Sat Jun 5 01:30:07 UTC 2021


Cool! Thank you so much!!
It answers my question that why CI cannot detect such failure because it's using GCC5+.

Leif,
Can you verify that this can resolve your GCC49 issue?

Thanks,
Ray

> -----Original Message-----
> From: devel at edk2.groups.io <devel at edk2.groups.io> On Behalf Of
> gaoliming
> Sent: Saturday, June 5, 2021 9:19 AM
> To: devel at edk2.groups.io
> Cc: Ni, Ray <ray.ni at intel.com>; Leif Lindholm <leif at nuviainc.com>; Feng,
> Bob C <bob.c.feng at intel.com>
> Subject: [edk2-devel] [PATCH 1/1] BaseTools GenFw: Fix regression issue to
> convert the image to ACPI data
> 
> 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 at byosoft.com.cn>
> Cc: Ray Ni <ray.ni at intel.com>
> Cc: Leif Lindholm <leif at nuviainc.com>
> Cc: Bob Feng <bob.c.feng at 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(-)
> 
> 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
> 
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#76099): https://edk2.groups.io/g/devel/message/76099
Mute This Topic: https://groups.io/mt/83322902/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list