LLVM  9.0.0svn
Classes | Namespaces | Macros | Enumerations
BTF.h File Reference

This file contains the layout of .BTF and .BTF.ext ELF sections. More...

#include "BTF.def"
Include dependency graph for BTF.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  llvm::BTF::Header
 The .BTF section header definition. More...
 
struct  llvm::BTF::CommonType
 The BTF common type definition. More...
 
struct  llvm::BTF::BTFEnum
 BTF_KIND_ENUM is followed by multiple "struct BTFEnum". More...
 
struct  llvm::BTF::BTFArray
 BTF_KIND_ARRAY is followed by one "struct BTFArray". More...
 
struct  llvm::BTF::BTFMember
 BTF_KIND_STRUCT and BTF_KIND_UNION are followed by multiple "struct BTFMember". More...
 
struct  llvm::BTF::BTFParam
 BTF_KIND_FUNC_PROTO are followed by multiple "struct BTFParam". More...
 
struct  llvm::BTF::BTFDataSec
 BTF_KIND_DATASEC are followed by multiple "struct BTFDataSecVar". More...
 
struct  llvm::BTF::ExtHeader
 The .BTF.ext section header definition. More...
 
struct  llvm::BTF::BPFFuncInfo
 Specifying one function info. More...
 
struct  llvm::BTF::SecFuncInfo
 Specifying function info's in one section. More...
 
struct  llvm::BTF::BPFLineInfo
 Specifying one line info. More...
 
struct  llvm::BTF::SecLineInfo
 Specifying line info's in one section. More...
 

Namespaces

 llvm
 This class represents lattice values for constants.
 
 llvm::BTF
 

Macros

#define HANDLE_BTF_KIND(ID, NAME)   BTF_KIND_##NAME = ID,
 

Enumerations

enum  : uint32_t { llvm::BTF::MAGIC = 0xeB9F, llvm::BTF::VERSION = 1 }
 
enum  {
  llvm::BTF::HeaderSize = 24, llvm::BTF::ExtHeaderSize = 24, llvm::BTF::CommonTypeSize = 12, llvm::BTF::BTFArraySize = 12,
  llvm::BTF::BTFEnumSize = 8, llvm::BTF::BTFMemberSize = 12, llvm::BTF::BTFParamSize = 8, llvm::BTF::BTFDataSecVarSize = 12,
  llvm::BTF::SecFuncInfoSize = 8, llvm::BTF::SecLineInfoSize = 8, llvm::BTF::BPFFuncInfoSize = 8, llvm::BTF::BPFLineInfoSize = 16
}
 Sizes in bytes of various things in the BTF format. More...
 
enum  : uint32_t { llvm::BTF::MAX_VLEN = 0xffff }
 
enum  llvm::BTF::TypeKinds : uint8_t
 
enum  : uint8_t { llvm::BTF::INT_SIGNED = (1 << 0), llvm::BTF::INT_CHAR = (1 << 1), llvm::BTF::INT_BOOL = (1 << 2) }
 Attributes stored in the INT_ENCODING. More...
 
enum  : uint8_t { llvm::BTF::VAR_STATIC = 0, llvm::BTF::VAR_GLOBAL_ALLOCATED = 1, llvm::BTF::VAR_GLOBAL_TENTATIVE = 2, llvm::BTF::VAR_GLOBAL_EXTERNAL = 3 }
 Variable scoping information. More...
 

Detailed Description

This file contains the layout of .BTF and .BTF.ext ELF sections.

The binary layout for .BTF section: struct Header Type and Str subsections The Type subsection is a collection of types with type id starting with 1. The Str subsection is simply a collection of strings.

The binary layout for .BTF.ext section: struct ExtHeader FuncInfo and LineInfo subsections The FuncInfo subsection is defined as below: BTFFuncInfo Size struct SecFuncInfo for ELF section #1 A number of struct BPFFuncInfo for ELF section #1 struct SecFuncInfo for ELF section #2 A number of struct BPFFuncInfo for ELF section #2 ... The LineInfo subsection is defined as below: BPFLineInfo Size struct SecLineInfo for ELF section #1 A number of struct BPFLineInfo for ELF section #1 struct SecLineInfo for ELF section #2 A number of struct BPFLineInfo for ELF section #2 ...

The section formats are also defined at https://github.com/torvalds/linux/blob/master/include/uapi/linux/btf.h

Definition in file BTF.h.

Macro Definition Documentation

◆ HANDLE_BTF_KIND

#define HANDLE_BTF_KIND (   ID,
  NAME 
)    BTF_KIND_##NAME = ID,

Definition at line 84 of file BTF.h.