---
title: "github.com/cilium/ebpf v0.22.0 Breaking Changes"
description: "What each github.com/cilium/ebpf release removed, renamed or changed: 460 breaking changes in 15 versions on Go modules, each with its source."
canonical_url: https://since.dev/packages/go/github.com/cilium/ebpf
last_updated: 2026-12-04
---

# github.com/cilium/ebpf breaking changes

github.com/cilium/ebpf v0.22.0 (June 26, 2026) is its newest release with breaking changes, 2 of them. The first: Removed github.com/cilium/ebpf/btf.FlushKernelSpec. Every breaking API change we have recorded in github.com/cilium/ebpf on Go modules: 460 breaking changes in 15 versions. Below, its 15 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `v0.22.0`, released June 26, 2026. 

Its v0.17.0 release requires [Go 1.22](https://since.dev/calendar/go/1.22.md) or later. [Go end of life dates](https://since.dev/calendar/go.md).

- From [v0.8.0](#v-v0-8-0) to [v0.22.0](#v-v0-22-0): 432 breaking changes in 14 versions.

## github.com/cilium/ebpf v0.22.0 breaking changes

github.com/cilium/ebpf v0.22.0, released June 26, 2026: 2 breaking changes.

- **Removed** `github.com/cilium/ebpf/btf.FlushKernelSpec`  

The global kernel BTF cache is gone, so btf.FlushKernelSpec no longer exists. To keep caching, create a btf.Cache with btf.NewCache and pass it via CollectionOptions.Cache to NewCollectionWithOptions. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.22.0)
- **Behavior changed** `btf.Cache`  

Collection loading no longer reuses a process-wide kernel BTF cache, which may slow loading on busy systems. Opt back in by passing your own cache from btf.NewCache through CollectionOptions.Cache. [github.com](https://github.com/cilium/ebpf/releases/tag/v0.22.0)

## github.com/cilium/ebpf v0.21.0 breaking changes

github.com/cilium/ebpf v0.21.0, released March 5, 2026: 37 breaking changes.

- **Removed** `github.com/cilium/ebpf.CollectionSpec.RewriteConstants`  

Use CollectionSpec.Variables instead. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0)
- **Removed** `github.com/cilium/ebpf.CollectionSpec.RewriteMaps`  

Pass CollectionOptions.MapReplacements when loading the Collection instead. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0)
- **Removed** `github.com/cilium/ebpf.MissingConstantsError`  

github.com/cilium/ebpf.MissingConstantsError was removed in github.com/cilium/ebpf v0.21.0 [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0)
- **Removed** `github.com/cilium/ebpf.VariableSpec.MapName`  

Use VariableSpec.SectionName instead. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0)
- **Removed** `github.com/cilium/ebpf/asm.Instruction.MapPtr`  

Use Instruction.Map instead. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0)
- **Removed** `github.com/cilium/ebpf/asm.Instruction.RewriteMapPtr`  

Use Instruction.AssociateMap instead. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0)
- **Removed** `github.com/cilium/ebpf/asm.Instruction.Sym`  

Use Instruction.WithSymbol instead. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0)
- **Removed** `github.com/cilium/ebpf/asm.Instructions.RewriteMapPtr`  

Use AssociateMap instead. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0)
- **Removed** `github.com/cilium/ebpf/asm.IsUnreferencedSymbol`  

Use errors.Is(err, asm.ErrUnreferencedSymbol) instead. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0)
- **Removed** `github.com/cilium/ebpf/asm.WindowsFnMemcmp`  

Use the new name asm.WindowsFnMemcmpS after the ebpf-for-windows helper rename. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.21.0)

And 27 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## github.com/cilium/ebpf v0.20.0 breaking changes

github.com/cilium/ebpf v0.20.0, released October 31, 2025: 4 breaking changes.

- **Removed** `github.com/cilium/ebpf.ProgramOptions.KernelModuleTypes`  

The KernelModuleTypes field was removed. Merge module BTF into vmlinux BTF, or pass extra specs via ExtraRelocationTargets for advanced cases. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.20.0)
- **Removed** `github.com/cilium/ebpf/btf.Cache.KernelTypes`  

The KernelTypes field is no longer accessible; code that set it directly will not compile. Use btf.NewCache() instead. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.20.0)
- **Removed** `github.com/cilium/ebpf/btf.Cache.LoadedModules`  

The LoadedModules field is no longer accessible; code that set it directly will not compile. Use btf.NewCache() instead. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.20.0)
- **Removed** `github.com/cilium/ebpf/btf.Cache.ModuleTypes`  

The ModuleTypes field is no longer accessible; code that set it directly will not compile. Use btf.NewCache() instead. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.20.0)

## github.com/cilium/ebpf v0.19.0 breaking changes

github.com/cilium/ebpf v0.19.0, released June 26, 2025: 11 breaking changes.

- **Removed**  

LLVM 11 is no longer supported; use LLVM 14, 17, or 20. [github.com](https://github.com/cilium/ebpf/releases/tag/v0.19.0)
- **Removed** `github.com/cilium/ebpf.ProgramInfo.RecursionMisses`  

github.com/cilium/ebpf.ProgramInfo.RecursionMisses was removed in github.com/cilium/ebpf v0.19.0 [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.19.0)
- **Removed** `github.com/cilium/ebpf.ProgramInfo.RunCount`  

github.com/cilium/ebpf.ProgramInfo.RunCount was removed in github.com/cilium/ebpf v0.19.0 [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.19.0)
- **Removed** `github.com/cilium/ebpf.ProgramInfo.Runtime`  

github.com/cilium/ebpf.ProgramInfo.Runtime was removed in github.com/cilium/ebpf v0.19.0 [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.19.0)
- **Removed** `github.com/cilium/ebpf/asm.XAddMode`  

github.com/cilium/ebpf/asm.XAddMode was removed in github.com/cilium/ebpf v0.19.0 [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.19.0)
- **Removed** `github.com/cilium/ebpf/btf.Spec.Iterate`  

github.com/cilium/ebpf/btf.Spec.Iterate was removed in github.com/cilium/ebpf v0.19.0 [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.19.0)
- **Removed** `github.com/cilium/ebpf/btf.TypesIterator`  

github.com/cilium/ebpf/btf.TypesIterator was removed in github.com/cilium/ebpf v0.19.0 [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.19.0)
- **Removed** `github.com/cilium/ebpf/pin.WalkDirFunc`  

github.com/cilium/ebpf/pin.WalkDirFunc was removed in github.com/cilium/ebpf v0.19.0 [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.19.0)
- **Configuration changed**  

The minimum supported eBPF for Windows version is now 0.21.0. Users on older eBPF for Windows must upgrade. [github.com](https://github.com/cilium/ebpf/releases/tag/v0.19.0)
- **Signature changed** `github.com/cilium/ebpf/asm.OpCode`  

Was type OpCode uint16; now type OpCode uint32. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.19.0)

And 1 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## github.com/cilium/ebpf v0.18.0 breaking changes

github.com/cilium/ebpf v0.18.0, released April 2, 2025: 220 breaking changes.

- **Removed** `github.com/cilium/ebpf.SanitizeName`  

The SanitizeName function is no longer exported. Map and program names are now sanitized automatically, so callers must stop using it. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.18.0)
- **Removed** `github.com/cilium/ebpf/asm.Instructions.Unmarshal`  

github.com/cilium/ebpf/asm.Instructions.Unmarshal was removed in github.com/cilium/ebpf v0.18.0 [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.18.0)
- **Behavior changed**  

Names passed to the kernel are now automatically sanitized, which changes the names seen by the kernel for existing code. [github.com](https://github.com/cilium/ebpf/releases/tag/v0.18.0)
- **Behavior changed**  

The ELF reader now always allows dots in names and strips them only when making syscalls. Users with pinned objects whose names contain dots on kernels without dot support may break. [github.com](https://github.com/cilium/ebpf/releases/tag/v0.18.0)
- **Signature changed** `github.com/cilium/ebpf.MapID`  

Was type MapID uint32; now type MapID = sys.MapID. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.18.0)
- **Signature changed** `github.com/cilium/ebpf.ProgramID`  

Was type ProgramID uint32; now type ProgramID = sys.ProgramID. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.18.0)
- **Signature changed** `github.com/cilium/ebpf/asm.BuiltinFunc`  

Was type BuiltinFunc int32; now type BuiltinFunc uint32. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.18.0)
- **Signature changed** `github.com/cilium/ebpf/asm.FnBind`  

Was const FnBind BuiltinFunc; now const FnBind. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.18.0)
- **Signature changed** `github.com/cilium/ebpf/asm.FnBprmOptsSet`  

Was const FnBprmOptsSet BuiltinFunc; now const FnBprmOptsSet. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.18.0)
- **Signature changed** `github.com/cilium/ebpf/asm.FnBtfFindByNameKind`  

Was const FnBtfFindByNameKind BuiltinFunc; now const FnBtfFindByNameKind. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.18.0)

And 210 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## github.com/cilium/ebpf v0.17.0 breaking changes

github.com/cilium/ebpf v0.17.0, released December 18, 2024: 16 breaking changes.

- **Removed**  

The library no longer supports Go 1.21. Upgrade to Go 1.22 or later. [github.com](https://github.com/cilium/ebpf/releases/tag/v0.17.0)
- **Removed** `github.com/cilium/ebpf.DefaultVerifierLogSize`  

github.com/cilium/ebpf.DefaultVerifierLogSize was removed in github.com/cilium/ebpf v0.17.0 [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.17.0)
- **Removed** `github.com/cilium/ebpf.MapSpec.Freeze`  

Automatic map freezing now depends only on the map name with a .(ro)data prefix. If you set Freeze manually, use a conventional map name instead. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.17.0)
- **Removed** `github.com/cilium/ebpf.ProgramOptions.LogSize`  

The LogSize field was a no-op since 0.16 and is now gone. Use ProgramOptions.LogSizeStart to set the starting size of the verifier log buffer. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.17.0)
- **Removed** `github.com/cilium/ebpf.ProgramSpec.KernelModule`  

ProgramSpec.KernelModule() was unexported and is no longer usable from outside the library. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.17.0)
- **Removed** `github.com/cilium/ebpf.VerifierError.Truncated`  

The Truncated field on VerifierError has been removed. Use ProgramOptions.LogSizeStart to control the log buffer size. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.17.0)
- **Removed** `github.com/cilium/ebpf/btf.FuncInfos`  

github.com/cilium/ebpf/btf.FuncInfos was removed in github.com/cilium/ebpf v0.17.0 [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.17.0)
- **Removed** `github.com/cilium/ebpf/btf.LineInfos`  

github.com/cilium/ebpf/btf.LineInfos was removed in github.com/cilium/ebpf v0.17.0 [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.17.0)
- **Removed** `github.com/cilium/ebpf/features.MapFlags.String`  

github.com/cilium/ebpf/features.MapFlags.String was removed in github.com/cilium/ebpf v0.17.0 [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.17.0)
- **Behavior changed** `btf.Struct`  

Only used kallsyms entries are cached now, so repeated scans may use more CPU when new kernel symbols appear on every load. [github.com](https://github.com/cilium/ebpf/releases/tag/v0.17.0)

And 6 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## Older versions

9 older versions, each with its first changes. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

### github.com/cilium/ebpf v0.16.0 breaking changes

github.com/cilium/ebpf v0.16.0, released July 24, 2024: 1 breaking change.

- **Configuration changed**  

The go directive in go.mod is now 1.21, so the module needs Go 1.21 or later to build. [github.com](https://github.com/cilium/ebpf/releases/tag/v0.16.0)

### github.com/cilium/ebpf v0.15.0 breaking changes

github.com/cilium/ebpf v0.15.0, released April 22, 2024: 2 breaking changes.

- **Removed** `github.com/cilium/ebpf/btf.Transformer`  

The btf.Transformer type was removed; use the new btf.As function instead. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.15.0)
- **Signature changed** `github.com/cilium/ebpf/btf.Copy`  

The transform argument of Copy was removed. Use the new btf.As function instead. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.15.0)

### github.com/cilium/ebpf v0.14.0 breaking changes

github.com/cilium/ebpf v0.14.0, released March 27, 2024: 8 breaking changes.

- **Behavior changed** `ProgramOptions`  

ProgramOptions gained a KernelModuleTypes field, so code that compares it with == no longer compiles. [github.com](https://github.com/cilium/ebpf/releases/tag/v0.14.0)
- **Signature changed** `github.com/cilium/ebpf/btf.CORERelocate`  

Callers of btf.CORERelocate must update their calls to the new signature. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.14.0)

And 6 more in this version.

### github.com/cilium/ebpf v0.13.0 breaking changes

github.com/cilium/ebpf v0.13.0, released February 15, 2024: 98 breaking changes.

- **Removed**  

This release requires at least Go 1.21, so older Go toolchains will no longer build it. [github.com](https://github.com/cilium/ebpf/releases/tag/v0.13.0)
- **Removed** `github.com/cilium/ebpf/link.QueryOptions.Path`  

link.QueryOptions.Path is gone; pass an fd to the directory via QueryOptions.Target instead. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.13.0)

And 96 more in this version.

### github.com/cilium/ebpf v0.12.0 breaking changes

github.com/cilium/ebpf v0.12.0, released October 11, 2023: 1 breaking change.

- **Removed**  

The package now needs Go 1.20 at minimum, so projects on older Go versions must upgrade their toolchain before using this release. [github.com](https://github.com/cilium/ebpf/releases/tag/v0.12.0)

### github.com/cilium/ebpf v0.11.0 breaking changes

github.com/cilium/ebpf v0.11.0, released July 6, 2023: 5 breaking changes.

- **Behavior changed**  

The library now requires at least Go 1.19 to build; older toolchains must be upgraded. [github.com](https://github.com/cilium/ebpf/releases/tag/v0.11.0)
- **Signature changed** `github.com/cilium/ebpf/btf.Handle.Spec`  

Callers of Handle.Spec must pass a base spec argument; nil is accepted for vmlinux handles. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.11.0)

And 3 more in this version.

### github.com/cilium/ebpf v0.10.0 breaking changes

github.com/cilium/ebpf v0.10.0, released January 16, 2023: 17 breaking changes.

- **Removed** `github.com/cilium/ebpf.MapSpec.BTF`  

Setting MapSpec.BTF to nil no longer disables BTF during loading. Code that sets this field must stop using it. [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.10.0)
- **Removed** `github.com/cilium/ebpf.MapType.Max`  

github.com/cilium/ebpf.MapType.Max was removed in github.com/cilium/ebpf v0.10.0 [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.10.0)

And 15 more in this version.

### github.com/cilium/ebpf v0.9.0 breaking changes

github.com/cilium/ebpf v0.9.0, released May 25, 2022: 10 breaking changes.

- **Removed** `github.com/cilium/ebpf.ProgramOptions.TargetBTF`  

github.com/cilium/ebpf.ProgramOptions.TargetBTF was removed in github.com/cilium/ebpf v0.9.0 [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.9.0)
- **Renamed** `CollectionSpec.BTF`  

CollectionSpec.BTF is now called CollectionSpec.Types. Update field references. [github.com](https://github.com/cilium/ebpf/releases/tag/v0.9.0)

And 8 more in this version.

### github.com/cilium/ebpf v0.8.0 breaking changes

github.com/cilium/ebpf v0.8.0, released January 21, 2022: 28 breaking changes.

- **Removed** `github.com/cilium/ebpf.FuzzLoadCollectionSpec`  

github.com/cilium/ebpf.FuzzLoadCollectionSpec was removed in github.com/cilium/ebpf v0.8.0 [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.8.0)
- **Removed** `github.com/cilium/ebpf/link.FreplaceLink`  

github.com/cilium/ebpf/link.FreplaceLink was removed in github.com/cilium/ebpf v0.8.0 [pkg.go.dev](https://pkg.go.dev/github.com/cilium/ebpf@v0.8.0)

And 26 more in this version.

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
