-
Notifications
You must be signed in to change notification settings - Fork 716
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit makes the DeclTag BTF type exported. The DeclTag has been unexported because its encoding is a bit tricky. DeclTags on the wire refer to a type by its ID, and an component index. Unlike other BTF types, the type ID isn't always the actual "target", instead if the component index is not `-1` it targets a child object of the type. This commit adds a `Tags` field to all types that can have DeclTags including Members. Exception is function parameters. Due to the func -> funcProto -> parameter encoding, it is possible that BTF deduplication reuses the same funcProto for multiple functions. The declTags point to the func to annotate the arguments. Thus, adding a `Tags` field to Param would cause inaccurate BTF marshalling. Instead, a `ParamTags` field is added the func as `[][]string` to match the write format more closely to avoid issues caused by BTF deduplication. In addition, the BTF marshalling logic that creates a minimal BTF blob for the program has been updated to include DeclTags associated with FuncInfos. Before we were not adding the DeclTags to the generated BTF even if the ELF included them. Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
- Loading branch information
1 parent
58de0cd
commit 1c26ad8
Showing
6 changed files
with
139 additions
and
29 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
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