4 " * bpf-script-test-prologue.c\n" 5 " * Test BPF prologue\n" 7 "#ifndef LINUX_VERSION_CODE\n" 8 "# error Need LINUX_VERSION_CODE\n" 9 "# error Example: for 4.2 kernel, put 'clang-opt=\"-DLINUX_VERSION_CODE=0x40200\" into llvm section of ~/.perfconfig'\n" 11 "#define SEC(NAME) __attribute__((section(NAME), used))\n" 13 "#include <uapi/linux/fs.h>\n" 15 "#define FMODE_READ 0x1\n" 16 "#define FMODE_WRITE 0x2\n" 18 "static void (*bpf_trace_printk)(const char *fmt, int fmt_size, ...) =\n" 21 "SEC(\"func=null_lseek file->f_mode offset orig\")\n" 22 "int bpf_func__null_lseek(void *ctx, int err, unsigned long f_mode,\n" 23 " unsigned long offset, unsigned long orig)\n" 27 " if (f_mode & FMODE_WRITE)\n" 31 " if (orig == SEEK_CUR)\n" 36 "char _license[] SEC(\"license\") = \"GPL\";\n" 37 "int _version SEC(\"version\") = LINUX_VERSION_CODE;\n"
const char test_llvm__bpf_test_prologue_prog[]