alpha/boot/tools/objstrip: fix the check for ELF header
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 9 Jan 2023 05:14:02 +0000 (00:14 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:39:35 +0000 (09:39 +0100)
commit0305bf6af005c20d05ca2e6c70b65226d0bf5db4
tree0ff2145acd13eefe3675456b99c1c1d6ae393373
parent89a0079049f5568268d75c8cdf28bec0e2553e23
alpha/boot/tools/objstrip: fix the check for ELF header

[ Upstream commit 1878787797cbb019eeefe6f905514dcd557302b6 ]

Just memcmp() with ELFMAG - that's the normal way to do it in userland
code, which that thing is.  Besides, that has the benefit of actually
building - str_has_prefix() is *NOT* present in <string.h>.

Fixes: 5f14596e55de "alpha: Replace strncmp with str_has_prefix"
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/alpha/boot/tools/objstrip.c