From 10ebd8556b7990499c896a550e3d416b444211e6 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Fri, 10 May 2024 02:23:07 +0000 Subject: [PATCH] add led --- 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