diff --git a/init/Kconfig b/init/Kconfig
index ddc0eeb8eadfdd7bfcd11abaaa261f8e77f4e11d..61e61137cf0353a636391255849cc64fdfb305e9 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -87,6 +87,16 @@ config EMBED_MODULES_IMAGE
 	  generated modules into the final kernel binary.
 	  This is a convenience option, if unsure, say Y.
 
+config EMBED_APPLICATION
+	string "Embed an application image"
+	depends on EMBED_MODULES_IMAGE
+	default ""
+	help
+	  Specify a path to an executable to embed or leave it empty.
+	  Note: in the current implementation, the executable is treated as a
+	  kernel module, so it requires to be relocatible and have a init/exit
+	  call.
+
 endif # MODULES
 
 
@@ -160,4 +170,5 @@ config DEBUG_INFO_REDUCED
 	  DEBUG_INFO build and compile times are reduced too.
 	  Only works with newer gcc versions.
 
+
 endmenu
diff --git a/scripts/link-leanos.sh b/scripts/link-leanos.sh
index db0f57a1cb85898593977e34b47939a1766e1e76..b497a25c30ac9298500cba17018841860eb240b8 100755
--- a/scripts/link-leanos.sh
+++ b/scripts/link-leanos.sh
@@ -309,7 +309,9 @@ if [ "$1" = "embed" ]; then
 	rm -f modules.image
 	${AR} rcs ${srctree}/modules.image \
 		$(tr '\n' ' ' < ${srctree}/modules.order) \
-		$(find dsp/xentium -name *.xen)
+		$(find dsp/xentium -name *.xen) \
+		"${CONFIG_EMBED_APPLICATION}"
+		
 
 	leanos_link "${kallsymso}" leanos "${embedflags}"
 	exit