Skip to content

Commit

Permalink
Update libbpf to v1.4.5 (#957)
Browse files Browse the repository at this point in the history
* Add update.sh script to libbpf to sync with upstream

* Update libbpf
  • Loading branch information
MrAlias authored Jul 26, 2024
1 parent 8e544c0 commit c80c3ab
Show file tree
Hide file tree
Showing 15 changed files with 1,925 additions and 3,251 deletions.
32 changes: 32 additions & 0 deletions internal/include/arguments.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,38 @@
#include "bpf_helpers.h"
#include <stdbool.h>

#if defined(bpf_target_x86)

#if defined(__KERNEL__) || defined(__VMLINUX_H__)

#define GO_PARAM1(x) ((x)->ax)
#define GO_PARAM2(x) ((x)->bx)
#define GO_PARAM3(x) ((x)->cx)
#define GO_PARAM4(x) ((x)->di)
#define GO_PARAM5(x) ((x)->si)
#define GO_PARAM6(x) ((x)->r8)
#define GO_PARAM7(x) ((x)->r9)
#define GO_PARAM8(x) ((x)->r10)
#define GO_PARAM9(x) ((x)->r11)
#define GOROUTINE(x) ((x)->r14)

#endif

#elif defined(bpf_target_arm64)

#define GO_PARAM1(x) (__PT_REGS_CAST(x)->__PT_PARM1_REG)
#define GO_PARAM2(x) (__PT_REGS_CAST(x)->__PT_PARM2_REG)
#define GO_PARAM3(x) (__PT_REGS_CAST(x)->__PT_PARM3_REG)
#define GO_PARAM4(x) (__PT_REGS_CAST(x)->__PT_PARM4_REG)
#define GO_PARAM5(x) (__PT_REGS_CAST(x)->__PT_PARM5_REG)
#define GO_PARAM6(x) (__PT_REGS_CAST(x)->__PT_PARM6_REG)
#define GO_PARAM7(x) (__PT_REGS_CAST(x)->__PT_PARM7_REG)
#define GO_PARAM8(x) (__PT_REGS_CAST(x)->__PT_PARM8_REG)
#define GO_PARAM9(x) (__PT_REGS_CAST(x)->regs[8])
#define GOROUTINE(x) (__PT_REGS_CAST(x)->regs[28])

#endif

// Injected in init
volatile const bool is_registers_abi;

Expand Down
293 changes: 0 additions & 293 deletions internal/include/libbpf/bpf.h

This file was deleted.

Loading

0 comments on commit c80c3ab

Please sign in to comment.