#!/bin/sh# SPDX-License-Identifier: GPL-2.0-only# ----------------------------------------------------------------------# extract-vmlinux - Extract uncompressed vmlinux from a kernel image## Inspired from extract-ikconfig# (c) 2009,2010 Dick Streefland <dick@streefland.net>## (c) 2011 Corentin Chary <corentin.chary@gmail.com>## ----------------------------------------------------------------------check_vmlinux(){if file "1ドル" | grep -q 'Linux kernel.*boot executable' ||readelf -h "1ドル" > /dev/null 2>&1thencat "1ドル"exit 0fi}try_decompress(){# The obscure use of the "tr" filter is to work around older versions of# "grep" that report the byte offset of the line instead of the pattern.# Try to find the header (1ドル) and decompress from herefor pos in `tr "1ドル\n2ドル" "\n2ドル=" < "$img" | grep -abo "^2ドル"`dopos=${pos%%:*}tail -c+$pos "$img" | 3ドル > $tmp 2> /dev/nullcheck_vmlinux $tmpdone}# Check invocation:me=${0##*/}img=1ドルif [ $# -ne 1 -o ! -s "$img" ]thenecho "Usage: $me <kernel-image>" >&2exit 2fi# Prepare temp files:tmp=$(mktemp /tmp/vmlinux-XXX)trap "rm -f $tmp" 0# That didn't work, so retry after decompression.try_decompress '037円213円010円' xy gunziptry_decompress '3757円zXZ000円' abcde unxztry_decompress 'BZh' xy bunzip2try_decompress '135円0円0円0円' xxx unlzmatry_decompress '211円114円132円' xy 'lzop -d'try_decompress '002円!L030円' xxx 'lz4 -d'try_decompress '(265円/375円' xxx unzstd# Finally check for uncompressed images or objects:check_vmlinux $img# Bail out:echo "$me: Cannot find vmlinux." >&2
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。