summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorMichael D Kinney <michael.d.kinney@intel.com>2020-11-24 16:25:05 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-04-15 15:58:44 +0000
commit251f9b3906370f9b539f3d364c3d42dcc7173e86 (patch)
treea8f5108934de70cb6adc3cec65038d6b2bfe4a51 /BaseTools
parentd0bf83e1ccabaf86169d664385eab5aed1c2a1f2 (diff)
downloadedk2-251f9b3906370f9b539f3d364c3d42dcc7173e86.tar.gz
edk2-251f9b3906370f9b539f3d364c3d42dcc7173e86.tar.bz2
edk2-251f9b3906370f9b539f3d364c3d42dcc7173e86.zip
BaseTools/Source/C: Remove CPU architecture assumptions
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3308 The EDK II Build Specifications do not restrict the set of CPU architectures that can be supported. Remove places in the EDK II that assume a fixed set of CPU architectures. Remove build breaks in the following tools when a check against a fixed set of CPU architectures is made. * GenFw Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Abner Chang <abner.chang@hpe.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/C/GenFw/Elf32Convert.c5
-rw-r--r--BaseTools/Source/C/GenFw/Elf64Convert.c5
2 files changed, 4 insertions, 6 deletions
diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c b/BaseTools/Source/C/GenFw/Elf32Convert.c
index 7f351287a9..2485b2cb7a 100644
--- a/BaseTools/Source/C/GenFw/Elf32Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf32Convert.c
@@ -1,7 +1,7 @@
/** @file
Elf32 Convert solution
-Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2013, ARM Ltd. All rights reserved.<BR>
Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
@@ -143,8 +143,7 @@ InitializeElf32 (
return FALSE;
}
if (!((mEhdr->e_machine == EM_386) || (mEhdr->e_machine == EM_ARM) || (mEhdr->e_machine == EM_RISCV))) {
- Error (NULL, 0, 3000, "Unsupported", "ELF e_machine is not Elf32 machine.");
- return FALSE;
+ Warning (NULL, 0, 3000, "Unsupported", "ELF e_machine is not Elf32 machine.");
}
if (mEhdr->e_version != EV_CURRENT) {
Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURRENT (%d)", (unsigned) mEhdr->e_version, EV_CURRENT);
diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 4ed6b4477e..d097db8632 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -1,7 +1,7 @@
/** @file
Elf64 convert solution
-Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2013-2014, ARM Ltd. All rights reserved.<BR>
Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
@@ -162,8 +162,7 @@ InitializeElf64 (
return FALSE;
}
if (!((mEhdr->e_machine == EM_X86_64) || (mEhdr->e_machine == EM_AARCH64) || (mEhdr->e_machine == EM_RISCV64))) {
- Error (NULL, 0, 3000, "Unsupported", "ELF e_machine is not Elf64 machine.");
- return FALSE;
+ Warning (NULL, 0, 3000, "Unsupported", "ELF e_machine is not Elf64 machine.");
}
if (mEhdr->e_version != EV_CURRENT) {
Error (NULL, 0, 3000, "Unsupported", "ELF e_version (%u) not EV_CURRENT (%d)", (unsigned) mEhdr->e_version, EV_CURRENT);