hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/scripts/extract-vmlinux
....@@ -1,4 +1,5 @@
11 #!/bin/sh
2
+# SPDX-License-Identifier: GPL-2.0-only
23 # ----------------------------------------------------------------------
34 # extract-vmlinux - Extract uncompressed vmlinux from a kernel image
45 #
....@@ -7,7 +8,6 @@
78 #
89 # (c) 2011 Corentin Chary <corentin.chary@gmail.com>
910 #
10
-# Licensed under the GNU General Public License, version 2 (GPLv2).
1111 # ----------------------------------------------------------------------
1212
1313 check_vmlinux()
....@@ -48,9 +48,6 @@
4848 tmp=$(mktemp /tmp/vmlinux-XXX)
4949 trap "rm -f $tmp" 0
5050
51
-# Initial attempt for uncompressed images or objects:
52
-check_vmlinux $img
53
-
5451 # That didn't work, so retry after decompression.
5552 try_decompress '\037\213\010' xy gunzip
5653 try_decompress '\3757zXZ\000' abcde unxz
....@@ -60,5 +57,8 @@
6057 try_decompress '\002!L\030' xxx 'lz4 -d'
6158 try_decompress '(\265/\375' xxx unzstd
6259
60
+# Finally check for uncompressed images or objects:
61
+check_vmlinux $img
62
+
6363 # Bail out:
6464 echo "$me: Cannot find vmlinux." >&2