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
// https://lwn.net/Articles/679137/ | |
// make csum && ./csum | |
// cc csum.c -o csum | |
// generic: ffe3 65507 | |
// x86 : ffffffe3 -29 | |
#include <stdio.h> | |
typedef unsigned int __wsum; |
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
So, e.g., this program ebpf program is jited to (scroll down) | |
test_pkt_access.o: file format ELF64-BPF | |
Disassembly of section test1: | |
process: | |
0: b7 00 00 00 02 00 00 00 r0 = 2 | |
1: 61 12 50 00 00 00 00 00 r2 = *(u32 *)(r1 + 80) | |
2: 61 11 4c 00 00 00 00 00 r1 = *(u32 *)(r1 + 76) | |
3: bf 13 00 00 00 00 00 00 r3 = r1 |