diff --git a/repos/base/run/ada.run b/repos/base/run/ada.run
index cf5ca5a5f3..59dd3eda34 100644
--- a/repos/base/run/ada.run
+++ b/repos/base/run/ada.run
@@ -30,7 +30,6 @@ grep_output {init -> test-ada}
unify_output {0x[0-9a-f]+} "UNIFIED"
compare_output_to {
- [init -> test-ada] Warning: using legacy main function, please convert to 'Component::construct'
[init -> test-ada] add called with a=13, b=14, result at address UNIFIED
[init -> test-ada] print_int called with argument 27
}
diff --git a/repos/base/src/test/ada/main.adb b/repos/base/src/test/ada/main.adb
index 168fd2d515..b1e97d12ab 100644
--- a/repos/base/src/test/ada/main.adb
+++ b/repos/base/src/test/ada/main.adb
@@ -13,8 +13,6 @@ procedure main is
result : Integer;
- r : test_package.some_range_t;
-
--
-- Declarations of external C functions
--
diff --git a/repos/base/src/test/ada/startup.cc b/repos/base/src/test/ada/startup.cc
index e5b6aa4c2c..64ae08c074 100644
--- a/repos/base/src/test/ada/startup.cc
+++ b/repos/base/src/test/ada/startup.cc
@@ -6,6 +6,7 @@
/* Genode includes */
#include
+#include
/**
* Declaration of the Ada main procedure
@@ -21,14 +22,15 @@ extern "C" void __gnat_eh_personality()
}
/**
- * C wrapper for the Ada main program
+ * Wrapper for the Ada main program
*
- * This function is called by the '_main' startup code. It may be used to
+ * This function is called on Genode component startup. It may be used to
* initialize memory objects at fixed virtual addresses prior calling the Ada
* main program.
*/
-extern "C" int main(int argc, char **argv)
+void Component::construct(Genode::Env &env)
{
_ada_main();
- return 0;
+
+ env.parent().exit(0);
}