libc: Always declare getenv, link/symlink and atexit/on_exit

since many c++ library implementation reference these symbols by using ::xxx but never
really use them, the declaration avoid the unused code is pulled into the final binary

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Idd7bf9a1e09b77a6b21f900cd3ede08a1cc82d86
This commit is contained in:
Xiang Xiao
2020-07-06 21:06:43 +08:00
committed by Abdelatif Guettouche
parent a349595316
commit 1bca457b28
4 changed files with 1 additions and 18 deletions
-6
View File
@@ -40,7 +40,6 @@ namespace std
using ::rand;
using ::random;
#ifndef CONFIG_DISABLE_ENVIRON
// Environment variable support
using ::get_environ_ptr;
@@ -49,18 +48,13 @@ namespace std
using ::clearenv;
using ::setenv;
using ::unsetenv;
#endif
// Process exit functions
using ::exit;
using ::abort;
#ifdef CONFIG_SCHED_ATEXIT
using ::atexit;
#endif
#ifdef CONFIG_SCHED_ONEXIT
using ::on_exit;
#endif
#ifndef __KERNEL__
// System command