diff --git a/ldso/dynlink.c b/ldso/dynlink.c index b46cbafb973fa77d9252bf030a1969594b6552ab..b561454b6845f142a6cd7bc2e36552c78b869a1f 100644 --- a/ldso/dynlink.c +++ b/ldso/dynlink.c @@ -99,8 +99,6 @@ int __init_tp(void *); void __init_libc(char **, char *); void *__copy_tls(unsigned char *); -hidden const char *__libc_get_version(void); - static struct builtin_tls { char c; struct pthread pt; @@ -1562,7 +1560,7 @@ _Noreturn void __dls3(size_t *sp) "Version %s\n" "Dynamic Program Loader\n" "Usage: %s [options] [--] pathname%s\n", - __libc_get_version(), ldname, + __libc_version, ldname, ldd_mode ? "" : " [args]"); _exit(1); } diff --git a/src/internal/libc.h b/src/internal/libc.h index 7307a738e178b2fa20469d190a8a8b009f6870a4..f536eaf6e5a11d408c3e30e9370fc70f64e917f3 100644 --- a/src/internal/libc.h +++ b/src/internal/libc.h @@ -43,6 +43,8 @@ extern hidden size_t __hwcap; extern hidden size_t __sysinfo; extern char *__progname, *__progname_full; +extern hidden const char __libc_version[]; + /* Designed to avoid any overhead in non-threaded processes */ hidden void __lock(volatile int *); hidden void __unlock(volatile int *); diff --git a/src/internal/version.c b/src/internal/version.c index 0d6e1f8206fb21bc860ceefd424718dc6e40b6d7..08bbf5b2b76ad49bf158e65a543d1003c5539116 100644 --- a/src/internal/version.c +++ b/src/internal/version.c @@ -1,9 +1,4 @@ #include "version.h" #include "libc.h" -static const char version[] = VERSION; - -hidden const char *__libc_get_version() -{ - return version; -} +const char __libc_version[] = VERSION;