import native symbols in lib.h

lib.h gets included into the host module and the wasm module. For the
host module the attributes will be ignored.
This commit is contained in:
2026-04-24 10:45:55 +02:00
parent 348aac20ae
commit 5aab319424
4 changed files with 18 additions and 15 deletions

View File

@ -60,12 +60,17 @@ extern "C" {
#endif
// Those functions are defined in the host program
void NOINLINE fail_start_trace(void); // Mark start of injection
void NOINLINE fail_stop_trace(void); // Mark end of injection
void NOINLINE fail_marker_positive(void); // Everything ok
void NOINLINE fail_marker_detected(void); // Everything ok
void NOINLINE fail_marker_negative(void); // Invalid code
void NOINLINE print(const char *msg);
void NOINLINE IMPORT("fail_start_trace")
fail_start_trace(void); // Mark start of injection
void NOINLINE IMPORT("fail_stop_trace")
fail_stop_trace(void); // Mark end of injection
void NOINLINE IMPORT("fail_marker_positive")
fail_marker_positive(void); // Everything ok
void NOINLINE IMPORT("fail_marker_detected")
fail_marker_detected(void); // Everything ok
void NOINLINE IMPORT("fail_marker_negative")
fail_marker_negative(void); // Invalid code
void NOINLINE IMPORT("print") print(const char *msg);
#ifdef __cplusplus
}