Packages and Binaries:
bpf-linker
This package contains bpd-linker which can be used to statically link multiple BPF object files together and optionally perform optimizations needed to target older kernels. It operates on LLVM bitcode, so the inputs must be bitcode files (.bc) or object files with embedded bitcode (.o), optionally stored inside ar archives (.a).
Installed size: 3.40 MB
How to install: sudo apt install bpf-linker
Dependencies:
- libc6
- libgcc-s1
bpf-linker
root@kali:~# bpf-linker -h
Usage: bpf-linker [OPTIONS] --output <OUTPUT> <INPUTS>...
Arguments:
<INPUTS>... Input files. Can be object files or static libraries
Options:
--target <TARGET> LLVM target triple. When not provided, the target is inferred from the inputs
--cpu <CPU> Target BPF processor. Can be one of `generic`, `probe`, `v1`, `v2`, `v3` [default: generic]
--cpu-features <features> Enable or disable CPU features. The available features are: alu32, dummy, dwarfris. Use +feature to enable a feature, or -feature to disable it. For example --cpu-features=+alu32,-dwarfris [default: ]
-o, --output <OUTPUT> Write output to <output>
--emit <EMIT> Output type. Can be one of `llvm-bc`, `asm`, `llvm-ir`, `obj` [default: obj]
--btf Emit BTF information
-L <LIBS> Add a directory to the library search path
-O <OPTIMIZE> Optimization level. 0-3, s, or z [default: 2]
--export-symbols <path> Export the symbols specified in the file `path`. The symbols must be separated by new lines
--log-file <path> Output logs to the given `path`
--log-level <level> Set the log level. If not specified, no logging is used. Can be one of `error`, `warn`, `info`, `debug`, `trace`
--unroll-loops Try hard to unroll loops. Useful when targeting kernels that don't support loops
--ignore-inline-never Ignore `noinline`/`#[inline(never)]`. Useful when targeting kernels that don't support function calls
--dump-module <path> Dump the final IR module to the given `path` before generating the code
--llvm-args <args> Extra command line arguments to pass to LLVM
--disable-expand-memcpy-in-order Disable passing --bpf-expand-memcpy-in-order to LLVM
--disable-memory-builtins Disable exporting memcpy, memmove, memset, memcmp and bcmp. Exporting those is commonly needed when LLVM does not manage to expand memory intrinsics to a sequence of loads and stores
--export <symbols> Comma separated list of symbols to export. See also `--export-symbols`
--fatal-errors <FATAL_ERRORS> Whether to treat LLVM errors as fatal [default: true] [possible values: true, false]
-h, --help Print help
-V, --version Print version
Updated on: 2025-Nov-18