]> git.baikalelectronics.ru Git - kernel.git/commit
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:33:30 +0000 (09:33 +0100)
commit04b1bfa92b6cc06aff331f3201b09e8d4cdb7b21
treed5b86394ae52bd90dc18962b013f5dc14c877963
parent06c6b63346fd2eaa328aabeb6b7e9b9733b7f49d
alpha/boot/tools/objstrip: fix the check for ELF header

[ Upstream commit 4d523ade05d64c781bccca8e12d6eec56e31dc0e ]

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: e52621a24137 "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