From 2716dfd0b7d570b6a6cbba8a4a7bc9e538d0520c Mon Sep 17 00:00:00 2001 From: Victor Westerhuis Date: Fri, 26 Nov 2021 20:24:20 +0100 Subject: [PATCH] test: Explicitly mark symbols as used Because some of the symbols are not otherwise referenced, GCC would like to remove them. Closes: !14 Signed-off-by: Guillem Jover --- test/nlist.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/nlist.c b/test/nlist.c index a2ac228..558524f 100644 --- a/test/nlist.c +++ b/test/nlist.c @@ -39,11 +39,11 @@ extern int data_pub_uninit[2048]; extern int *data_pub_ptr; int *data_pub_ptr = &data_prv_init; -int data_pub_init = 10; -int data_pub_uninit[2048]; +int data_pub_init __attribute__((__used__)) = 10; +int data_pub_uninit[2048] __attribute__((__used__)); extern int -func_pub(void); +func_pub(void) __attribute__((__used__)) ; int func_pub(void)