-
Notifications
You must be signed in to change notification settings - Fork 699
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btf: export API to create BTF from scratch
Export Spec.Add which adds a Type to a Spec. It's then possible to create BTF on-the-fly like so: spec := NewSpec() id, err := spec.Add(...) handle, err := NewHandle(&spec) Spec.Add is responsible for allocating type IDs, which makes the BTF encoder a lot simpler. Attempting to create a Handle from a Spec that doesn't contain all types will return an error. This can happen if a Type is modified after it has been added to a Spec.
- Loading branch information
Showing
9 changed files
with
296 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.