[COMMITTED] elf: Fix clang-18 build of elf/tst-ifunc-fault-mod.c test

Adhemerval Zanella adhemerval.zanella@linaro.org
Tue Aug 11 13:58:31 GMT 2026


clang-18 errors on the static ifunc resolvers seen as unused.
---
 elf/tst-ifunc-fault-mod.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/elf/tst-ifunc-fault-mod.c b/elf/tst-ifunc-fault-mod.c
index 11c21b48ac4..694ff5e9a99 100644
--- a/elf/tst-ifunc-fault-mod.c
+++ b/elf/tst-ifunc-fault-mod.c
@@ -17,6 +17,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <stddef.h>
+#include <sys/cdefs.h>
 
 static void
 implementation (void)
@@ -27,6 +28,7 @@ implementation (void)
 }
 
 static __typeof__ (implementation) *
+__attribute_used__
 resolver (void)
 {
   /* Produce a crash, without depending on any relocations.  */
-- 
2.53.0



More information about the Libc-alpha mailing list