diff --git a/scripts/tracetool/format/c.py b/scripts/tracetool/format/c.py
index 35555ae..9596e3a 100644
--- a/scripts/tracetool/format/c.py
+++ b/scripts/tracetool/format/c.py
@@ -17,4 +17,10 @@ from tracetool import out
 
 
 def begin(events):
-    out('/* This file is autogenerated by tracetool, do not edit. */')
+    out('/* This file is autogenerated by tracetool, do not edit. */',
+        '',
+        '/* Prevent backends that do not emit any C code from hitting a '
+        ' * warning in some versions of ranlib(1) because the object file '
+        ' * has no symbols.'
+        ' */',
+        'const char trace_c_unused_symbol_dummy;')
