carverdamien

Results 5 comments of carverdamien

Hi! What are you planning to do with ubpf ? Example for `prog.c` ``` unsigned long int prog(char *addr) { if (addr) return 0; return 1; } ``` Compile and...

You can call external functions in a bpf program but they must be registered first. [register_functions](https://github.com/iovisor/ubpf/blob/5b5763639a8096c30257e51214636f544129380c/vm/test.c#L229)

Compile with `-O2` ``` root@cda22c35d683:~# cat prog.c static int (*sqrti)(int) = (void *)3; unsigned long int prog(char *addr) { return sqrti(16); } root@cda22c35d683:~# cat prog.s .text .file "prog.c" .globl prog...

You might be confusing `prog` and `prog.o`