1 use crate::abi::Endian;
2 use crate::spec::{LinkerFlavor, MergeFunctions, PanicStrategy, TargetOptions};
4 pub fn opts(endian: Endian) -> TargetOptions {
8 linker_flavor: LinkerFlavor::BpfLinker,
11 dynamic_linking: true,
13 panic_strategy: PanicStrategy::Abort,
14 position_independent_executables: true,
15 // Disable MergeFunctions since:
16 // - older kernels don't support bpf-to-bpf calls
17 // - on newer kernels, userspace still needs to relocate before calling
18 // BPF_PROG_LOAD and not all BPF libraries do that yet
19 merge_functions: MergeFunctions::Disabled,
23 max_atomic_width: Some(64),