]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - debian/scripts/retpoline-extract
UBUNTU: [Packaging] retpoline-extract -- instantiate retpoline files for i386
[mirror_ubuntu-artful-kernel.git] / debian / scripts / retpoline-extract
CommitLineData
ac692c71
AW
1#!/bin/bash
2
3cd "$1" || exit 1
4
5{
6 echo "./vmlinux"
7 find . -name \*.ko
8} | xargs objdump --disassemble | \
9awk -F' ' '
10 /^.\// { file=$1; sub(":.*", "", file); sub("^.*/", "", file); }
11 /^[0-9a-f][0-9a-f]* <.*>:/ { tag=$1; sub(".*<", "", tag); sub(">.*", "", tag); tag=file " " tag; }
0c8dc4b7 12 $3 ~ /(call|jmp)q? *\*%/ { print(tag " " $3); }
ac692c71 13'