Export a __secure_getenv symbol for link-time compatibility with GRTEv3. Tested:

This commit is contained in:
Brooks Moses 2014-09-24 04:21:40 -07:00
parent a0db2d6209
commit 69f4e2a55d
2 changed files with 12 additions and 3 deletions

View File

@ -384,3 +384,9 @@ elf/ldd.bash.in
Import ldd patches from Ubuntu source package. This fixes the ability
of ldd to trace dependencies in non-executable dynamic libraries.
(bmoses, google-local)
stdlib/secure-getenv.c
Export a __secure_getenv weak symbol for backwards compatibility at link
time.
(bmoses, google-local)

View File

@ -32,6 +32,9 @@ __libc_secure_getenv (name)
weak_alias (__libc_secure_getenv, secure_getenv)
libc_hidden_weak (__libc_secure_getenv)
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_17)
compat_symbol (libc, __libc_secure_getenv, __secure_getenv, GLIBC_2_0);
#endif
/* Google-local: Export __secure_getenv to avoid linker errors during
the GRTEv3 to GRTEv4 transition period. */
//#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_17)
//compat_symbol (libc, __libc_secure_getenv, __secure_getenv, GLIBC_2_0);
//#endif
weak_alias (__libc_secure_getenv, __secure_getenv);