libs/libc/dllfcn, sched/init: Add LD_LIBRARY_PATH environment variable support.

This commit is contained in:
anchao
2019-01-26 11:47:14 -06:00
committed by Gregory Nutt
parent 9e2238f6cd
commit 88efb84847
3 changed files with 119 additions and 53 deletions
+5 -1
View File
@@ -436,6 +436,10 @@ int os_bringup(void)
(void)setenv("PATH", CONFIG_PATH_INITIAL, 1);
#endif
#if !defined(CONFIG_DISABLE_ENVIRON) && defined(CONFIG_LDPATH_INITIAL)
(void)setenv("LD_LIBRARY_PATH", CONFIG_LDPATH_INITIAL, 1);
#endif
/* Start the page fill worker kernel thread that will resolve page faults.
* This should always be the first thread started because it may have to
* resolve page faults in other threads
@@ -458,7 +462,7 @@ int os_bringup(void)
/* We an save a few bytes by discarding the IDLE thread's environment. */
#if !defined(CONFIG_DISABLE_ENVIRON) && defined(CONFIG_PATH_INITIAL)
#if !defined(CONFIG_DISABLE_ENVIRON) && (defined(CONFIG_PATH_INITIAL) || defined(CONFIG_LDPATH_INITIAL))
(void)clearenv();
#endif