-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d82754
commit a571be3
Showing
29 changed files
with
5,412 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
CXX = clang | ||
|
||
CXXFLAGS = -I../../runtime/include \ | ||
-I../../vm/compat/include \ | ||
-I../../third_party/spdlog/include \ | ||
-I../../vm/vm-core/include | ||
CFLAGS = -nostdinc \ | ||
-I../../third_party/macos \ | ||
-I../../runtime/include \ | ||
-I../../vm/compat/include \ | ||
-I../../third_party/spdlog/include \ | ||
-I../../vm/vm-core/include \ | ||
-D__KERNEL__ \ | ||
-D__BPF_TRACING__ \ | ||
-D__TARGET_ARCH_bpf \ | ||
-DCONFIG_64BIT | ||
|
||
SRC = mapop.bpf.c | ||
TGT = main | ||
|
||
main: $(SRC) | ||
$(CXX) $(SRC) -g --target=bpf -o $(TGT) $(CXXFLAGS) | ||
$(CXX) -g $(CFLAGS) -target bpf -Wall -O2 -c $(SRC) -o $(TGT) | ||
|
||
.PHONY: clean | ||
|
||
clean: | ||
rm -rf $(TGT) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include <libkern/OSByteOrder.h> | ||
|
||
#if defined(__LITTLE_ENDIAN__) | ||
#define __LITTLE_ENDIAN_BITFIELD | ||
#else | ||
#define __BIG_ENDIAN_BITFIELD | ||
#endif |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#include <errno.h> | ||
|
||
#define EUCLEAN 117 /* Structure needs cleaning */ |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
typedef __signed__ char __s8; | ||
typedef unsigned char __u8; | ||
|
||
typedef __signed__ short __s16; | ||
typedef unsigned short __u16; | ||
|
||
typedef __signed__ int __s32; | ||
typedef unsigned int __u32; | ||
|
||
__extension__ typedef __signed__ long long __s64; | ||
__extension__ typedef unsigned long long __u64; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#define __NR_perf_event_open -1 | ||
#define __NR_bpf -1 |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#define bswap_16(value) \ | ||
((((value) & 0xff) << 8) | ((value) >> 8)) | ||
|
||
#define bswap_32(value) \ | ||
(((uint32_t)bswap_16((uint16_t)((value) & 0xffff)) << 16) | \ | ||
(uint32_t)bswap_16((uint16_t)((value) >> 16))) | ||
|
||
#define bswap_64(value) \ | ||
(((uint64_t)bswap_32((uint32_t)((value) & 0xffffffff)) \ | ||
<< 32) | \ | ||
(uint64_t)bswap_32((uint32_t)((value) >> 32))) |
Oops, something went wrong.