Program Types and ELF Sections¶
The table below lists the program types, their attach types where relevant and the ELF section names supported by libbpf for them. The ELF section names follow these rules:
- typeis an exact match, e.g.- SEC("socket")
- type+means it can be either exact- SEC("type")or well-formed- SEC("type/extras")with a '- /' separator between- typeand- extras.
When extras are specified, they provide details of how to auto-attach the BPF program.  The
format of extras depends on the program type, e.g. SEC("tracepoint/<category>/<name>")
for tracepoints or SEC("usdt/<path>:<provider>:<name>") for USDT probes. The extras are
described in more detail in the footnotes.
| Program Type | Attach Type | ELF Section Name | Sleepable | 
|---|---|---|---|
| 
 | 
 | 
 | |
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | 
 | |
| 
 | 
 | ||
| 
 | 
 | 
 | |
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | 
 | |
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | |||
| 
 | 
 | ||
| 
 | 
 | 
 | |
| 
 | 
 | ||
| 
 | 
 | 
 | |
| 
 | 
 | ||
| 
 | |||
| 
 | |||
| 
 | |||
| 
 | |||
| 
 | Yes | ||
| 
 | |||
| 
 | Yes | ||
| 
 | |||
| 
 | 
 | ||
| 
 | |||
| 
 | 
 | 
 | |
| 
 | 
 | 
 | |
| 
 | 
 | ||
| 
 | Yes | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | |||
| 
 | 
 | ||
| 
 | |||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | |||
| 
 | 
 | 
 | |
| 
 | 
 | 
 | |
| 
 | 
 | 
 | |
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | ||
| 
 | 
 | 
 | |
| 
 | 
 | ||
| 
 | 
 | Yes | |
| 
 | 
 | ||
| 
 | |||
| 
 | 
 | 
 | |
| 
 | Yes | ||
| 
 | 
 | ||
| 
 | Yes | ||
| 
 | 
 | ||
| 
 | Yes | ||
| 
 | 
 | ||
| 
 | Yes | ||
| 
 | 
 | ||
| 
 | 
 | 
 | |
| 
 | |||
| 
 | 
 | ||
| 
 | |||
| 
 | 
 | ||
| 
 | 
Footnotes
- 1(1,2,3,4,5,6,7,8)
- The - fentryattach format is- fentry[.s]/<function>.
- 2(1,2)
- The - kprobeattach format is- kprobe/<function>[+<offset>]. Valid characters for- functionare- a-zA-Z0-9_.and- offsetmust be a valid non-negative integer.
- 3(1,2)
- The - ksyscallattach format is- ksyscall/<syscall>.
- 4(1,2,3,4)
- The - uprobeattach format is- uprobe[.s]/<path>:<function>[+<offset>].
- 5
- The - usdtattach format is- usdt/<path>:<provider>:<name>.
- 6(1,2)
- The - kprobe.multiattach format is- kprobe.multi/<pattern>where- patternsupports- *and- ?wildcards. Valid characters for pattern are- a-zA-Z0-9_.*?.
- 7(1,2)
- The - lsmattachment format is- lsm[.s]/<hook>.
- 8(1,2)
- The - raw_tpattach format is- raw_tracepoint[.w]/<tracepoint>.
- 9(1,2)
- The - tracepointattach format is- tracepoint/<category>/<name>.
- 10(1,2)
- The - iterattach format is- iter[.s]/<struct-name>.