Add BPF-to-BPF and PC relative call tests (#2395)
This commit is contained in:
16
programs/bpf/c/src/relative_call/relative_call.c
Normal file
16
programs/bpf/c/src/relative_call/relative_call.c
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @brief test program that generates BPF PC relative call instructions
|
||||
*/
|
||||
|
||||
#include <solana_sdk.h>
|
||||
|
||||
void __attribute__ ((noinline)) helper() {
|
||||
sol_log(__func__);
|
||||
}
|
||||
|
||||
extern bool entrypoint(const uint8_t *input) {
|
||||
sol_log(__func__);
|
||||
helper();
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user