summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-09-12 21:12:09 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-13 17:38:07 +0100
commit025343ed6e7ef9ccb7d3ff629d5e6b2f0f850924 (patch)
tree353e4013874d31cf13d78b939d13e34841bbbe09 /meta/lib
parent6c1ed635dfddbec565b9328b9bcf462eea61a558 (diff)
downloadpoky-025343ed6e7ef9ccb7d3ff629d5e6b2f0f850924.tar.gz
insane: Recognise BPF as a valid EM_MACHINE type
BPF Linux ELF objects are generated with kernel-selftests with >= 4.18 kernel and when clang is enabled which packages BPF objects into packages, therefore recongnise this as a valid ELF target Add a selftest for BPF Do not flag BPF objects in target, since they pretty much will be ok for most of kernels architectures we care do support BPF (From OE-Core rev: 3667a8ec016bae3f8026ef7b4c895546804f6368) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/qa.py3
-rw-r--r--meta/lib/oeqa/selftest/cases/oelib/elf.py1
2 files changed, 3 insertions, 1 deletions
diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py
index 3231e60cea..59c72ce580 100644
--- a/meta/lib/oe/qa.py
+++ b/meta/lib/oe/qa.py
@@ -158,7 +158,8 @@ def elf_machine_to_string(machine):
158 0x2A: "SuperH", 158 0x2A: "SuperH",
159 0x32: "IA-64", 159 0x32: "IA-64",
160 0x3E: "x86-64", 160 0x3E: "x86-64",
161 0xB7: "AArch64" 161 0xB7: "AArch64",
162 0xF7: "BPF"
162 }[machine] 163 }[machine]
163 except: 164 except:
164 return "Unknown (%s)" % repr(machine) 165 return "Unknown (%s)" % repr(machine)
diff --git a/meta/lib/oeqa/selftest/cases/oelib/elf.py b/meta/lib/oeqa/selftest/cases/oelib/elf.py
index 74ee6a11cc..15c03f4609 100644
--- a/meta/lib/oeqa/selftest/cases/oelib/elf.py
+++ b/meta/lib/oeqa/selftest/cases/oelib/elf.py
@@ -15,6 +15,7 @@ class TestElf(TestCase):
15 self.assertEqual(oe.qa.elf_machine_to_string(0x32), "IA-64") 15 self.assertEqual(oe.qa.elf_machine_to_string(0x32), "IA-64")
16 self.assertEqual(oe.qa.elf_machine_to_string(0x3E), "x86-64") 16 self.assertEqual(oe.qa.elf_machine_to_string(0x3E), "x86-64")
17 self.assertEqual(oe.qa.elf_machine_to_string(0xB7), "AArch64") 17 self.assertEqual(oe.qa.elf_machine_to_string(0xB7), "AArch64")
18 self.assertEqual(oe.qa.elf_machine_to_string(0xF7), "BPF")
18 19
19 self.assertEqual(oe.qa.elf_machine_to_string(0x00), "Unknown (0)") 20 self.assertEqual(oe.qa.elf_machine_to_string(0x00), "Unknown (0)")
20 self.assertEqual(oe.qa.elf_machine_to_string(0xDEADBEEF), "Unknown (3735928559)") 21 self.assertEqual(oe.qa.elf_machine_to_string(0xDEADBEEF), "Unknown (3735928559)")