Fix link errors with GCC 10 and binutils 2.34 on Fedora
[pintos-anon] / src / tests / vm / child-sort.c
index d755432cbd6dde76a2a34754bce422c3dafcb3d9..2b13b6725cf10574774b03d990db3a545cf8b029 100644 (file)
@@ -1,14 +1,12 @@
-/* Reads a 128 kB file and "sorts" the bytes in it, using
-   counting sort.  The sorted data is written back to the same
-   file in-place. */
+/* Reads a 128 kB file into static data and "sorts" the bytes in
+   it, using counting sort, a single-pass algorithm.  The sorted
+   data is written back to the same file in-place. */
 
 #include <debug.h>
 #include <syscall.h>
 #include "tests/lib.h"
 #include "tests/main.h"
 
-const char *test_name = "child-sort";
-
 unsigned char buf[128 * 1024];
 size_t histogram[256];
 
@@ -20,6 +18,7 @@ main (int argc UNUSED, char *argv[])
   size_t size;
   size_t i;
 
+  test_name = "child-sort";
   quiet = true;
 
   CHECK ((handle = open (argv[1])) > 1, "open \"%s\"", argv[1]);