Skip to content

Commit

Permalink
examples/c: Add support for arm64
Browse files Browse the repository at this point in the history
Add arm64 vmlinux.h header. Update Makefile to select
vmlinux.h by arch. The vmlinux/vmlinux.h is kept so that
this change won't break Rust and Xmake build.

Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
  • Loading branch information
chenhengqi authored and anakryiko committed Mar 3, 2022
1 parent bc18679 commit 84d69aa
Show file tree
Hide file tree
Showing 6 changed files with 160,932 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ LLVM_STRIP ?= llvm-strip
BPFTOOL ?= $(abspath ../../tools/bpftool)
LIBBPF_SRC := $(abspath ../../libbpf/src)
LIBBPF_OBJ := $(abspath $(OUTPUT)/libbpf.a)
VMLINUX := ../../vmlinux/vmlinux.h
ARCH := $(shell uname -m | sed 's/x86_64/x86/' | sed 's/aarch64/arm64/' | sed 's/ppc64le/powerpc/' | sed 's/mips.*/mips/')
VMLINUX := ../../vmlinux/$(ARCH)/vmlinux.h
# Use our own libbpf API headers and Linux UAPI headers distributed with
# libbpf to avoid dependency on system-wide headers, which could be missing or
# outdated
INCLUDES := -I$(OUTPUT) -I../../libbpf/include/uapi -I$(dir $(VMLINUX))
CFLAGS := -g -Wall
ARCH := $(shell uname -m | sed 's/x86_64/x86/' | sed 's/aarch64/arm64/' | sed 's/ppc64le/powerpc/' | sed 's/mips.*/mips/')

APPS = minimal bootstrap uprobe kprobe fentry

Expand Down
1 change: 1 addition & 0 deletions vmlinux/arm64/vmlinux.h
Loading

0 comments on commit 84d69aa

Please sign in to comment.