mirror of
https://github.com/sched-ext/scx.git
synced 2024-12-04 00:07:11 +00:00
20 lines
418 B
Plaintext
20 lines
418 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
bpftool="$1"
|
||
|
input="$2"
|
||
|
skel="$3"
|
||
|
subskel="$4"
|
||
|
|
||
|
stem="${input%.o}"
|
||
|
name="${input%.bpf.o}"
|
||
|
name="${name##*/}"
|
||
|
|
||
|
"$bpftool" gen object "$stem".l1o "$input"
|
||
|
"$bpftool" gen object "$stem".l2o "$stem".l1o
|
||
|
"$bpftool" gen object "$stem".l3o "$stem".l2o
|
||
|
cmp "$stem".l2o "$stem".l3o
|
||
|
"$bpftool" gen skeleton "$stem".l3o name "$name" > "$skel"
|
||
|
"$bpftool" gen subskeleton "$stem".l3o name "$name" > "$subskel"
|