From 78adaf5a94ec355815298ee769257bdebbfe375f Mon Sep 17 00:00:00 2001 From: xermicus Date: Wed, 13 Nov 2024 11:56:32 +0700 Subject: [PATCH] set the used attribute for import symbols Signed-off-by: xermicus --- capi/polkavm_guest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/capi/polkavm_guest.h b/capi/polkavm_guest.h index 8cdcbbc5..9768c30e 100644 --- a/capi/polkavm_guest.h +++ b/capi/polkavm_guest.h @@ -151,7 +151,7 @@ static void __attribute__ ((naked, used)) POLKAVM_UNIQUE(polkavm_export_dummy)() static struct PolkaVM_Metadata POLKAVM_JOIN(fn_name, __IMPORT_METADATA) __attribute__ ((section(".polkavm_metadata"))) = { \ 1, 0, sizeof(#fn_name) - 1, #fn_name, POLKAVM_COUNT_REGS(__VA_ARGS__), POLKAVM_COUNT_REGS(arg_return_ty) \ }; \ -static arg_return_ty __attribute__ ((naked)) fn_name(POLKAVM_IMPORT_ARGS_IMPL(__VA_ARGS__)) { \ +static arg_return_ty __attribute__ ((naked, used)) fn_name(POLKAVM_IMPORT_ARGS_IMPL(__VA_ARGS__)) { \ __asm__( \ POLKAVM_IMPORT_DEF() \ "ret\n" \