diff options
| author | Martin KaFai Lau <martin.lau@kernel.org> | 2025-08-12 02:15:41 +0300 |
|---|---|---|
| committer | Martin KaFai Lau <martin.lau@kernel.org> | 2025-08-12 22:14:02 +0300 |
| commit | 9e293d47bfb9e812196670f2deeefc8b9d0226e4 (patch) | |
| tree | a5f74c41abbd25749bf795f52e4e06c39ab7d102 /scripts/extract-vmlinux | |
| parent | fa479132845e94b60068fad01c2a9979b3efe2dc (diff) | |
| parent | 8f5ae30d69d7543eee0d70083daf4de8fe15d585 (diff) | |
| download | linux-9e293d47bfb9e812196670f2deeefc8b9d0226e4.tar.xz | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Cross merge bpf/master after 6.17-rc1.
No conflict.
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'scripts/extract-vmlinux')
| -rwxr-xr-x | scripts/extract-vmlinux | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/scripts/extract-vmlinux b/scripts/extract-vmlinux index 8995cd304e6e..189956b5a5c8 100755 --- a/scripts/extract-vmlinux +++ b/scripts/extract-vmlinux @@ -12,13 +12,12 @@ check_vmlinux() { - # Use readelf to check if it's a valid ELF - # TODO: find a better to way to check that it's really vmlinux - # and not just an elf - readelf -h $1 > /dev/null 2>&1 || return 1 - - cat $1 - exit 0 + if file "$1" | grep -q 'Linux kernel.*boot executable' || + readelf -h "$1" > /dev/null 2>&1 + then + cat "$1" + exit 0 + fi } try_decompress() |
