浏览代码

Kernel: Print an error when trying to load an incompatible ELF image.

Andreas Kling 6 年之前
父节点
当前提交
abd5931184
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Kernel/ELFImage.cpp

+ 3 - 1
Kernel/ELFImage.cpp

@@ -91,8 +91,10 @@ unsigned ELFImage::program_header_count() const
 bool ELFImage::parse()
 {
     // We only support i386.
-    if (header().e_machine != 3)
+    if (header().e_machine != 3) {
+        kprintf("ELFImage::parse(): e_machine=%u not supported!\n");
         return false;
+    }
 
     // First locate the string tables.
     for (unsigned i = 0; i < section_count(); ++i) {