]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools GenFw: Fix regression issue to convert the image to ACPI data
authorLiming Gao <gaoliming@byosoft.com.cn>
Sat, 5 Jun 2021 01:17:46 +0000 (09:17 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sun, 6 Jun 2021 08:03:00 +0000 (08:03 +0000)
Commit c6b872c updates GenFw base code attribute to find .text section.
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>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Tested-by: Leif Lindholm <leif@nuviainc.com>
BaseTools/Source/C/GenFw/Elf32Convert.c
BaseTools/Source/C/GenFw/Elf64Convert.c

index 7c8a065678ac1f28b08eba1130d46fcf5d5a6848..314f8233234ddaebbaf1139856e61c60c1bcf756 100644 (file)
@@ -435,7 +435,7 @@ ScanSections32 (
     }\r
   }\r
 \r
-  if (!FoundSection) {\r
+  if (!FoundSection && mOutImageType != FW_ACPI_IMAGE) {\r
     Error (NULL, 0, 3000, "Invalid", "Did not find any '.text' section.");\r
     assert (FALSE);\r
   }\r
index 8fe672e98448d25b13fac7ebb055afc0d988a62a..8b09db7b690b70b02362d03673afdfadd95444aa 100644 (file)
@@ -714,7 +714,7 @@ ScanSections64 (
     }\r
   }\r
 \r
-  if (!FoundSection) {\r
+  if (!FoundSection && mOutImageType != FW_ACPI_IMAGE) {\r
     Error (NULL, 0, 3000, "Invalid", "Did not find any '.text' section.");\r
     assert (FALSE);\r
   }\r