From e636c8d336489bf3eed5878299e6cc045bbad077 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Tue, 20 Feb 2024 01:17:29 +0000
Subject: [PATCH] debug lk
---
kernel/arch/alpha/boot/tools/objstrip.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/arch/alpha/boot/tools/objstrip.c b/kernel/arch/alpha/boot/tools/objstrip.c
index 825a16f..7cf92d1 100644
--- a/kernel/arch/alpha/boot/tools/objstrip.c
+++ b/kernel/arch/alpha/boot/tools/objstrip.c
@@ -148,7 +148,7 @@
#ifdef __ELF__
elf = (struct elfhdr *) buf;
- if (elf->e_ident[0] == 0x7f && strncmp((char *)elf->e_ident + 1, "ELF", 3) == 0) {
+ if (memcmp(&elf->e_ident[EI_MAG0], ELFMAG, SELFMAG) == 0) {
if (elf->e_type != ET_EXEC) {
fprintf(stderr, "%s: %s is not an ELF executable\n",
prog_name, inname);
--
Gitblit v1.6.2