Index: boot/generic/include/printf.h
===================================================================
--- boot/generic/include/printf.h	(revision 4872160f9c176d257f1757469d1adec8033d95f9)
+++ boot/generic/include/printf.h	(revision 47566347abc1fe7976a15f8b83986005eee06ea6)
@@ -36,8 +36,20 @@
 #include <stdarg.h>
 
+#ifndef NVERIFY_PRINTF
+
+#define PRINTF_ATTRIBUTE(start, end) \
+	__attribute__((format(gnu_printf, start, end)))
+
+#else /* NVERIFY_PRINTF */
+
+#define PRINTF_ATTRIBUTE(start, end)
+
+#endif /* NVERIFY_PRINTF */
+
 #define EOF  (-1)
 
 extern int puts(const char *);
-extern int printf(const char *, ...);
+extern int printf(const char *, ...)
+    PRINTF_ATTRIBUTE(1, 2);
 extern int vprintf(const char *, va_list);
 
