瀏覽代碼

remove use of SHARED macro in dynamic linker version reporting

also fix visibility of the glue function used.
Rich Felker 9 年之前
父節點
當前提交
9e0a317d8c
共有 2 個文件被更改,包括 2 次插入4 次删除
  1. 1 4
      src/internal/version.c
  2. 1 0
      src/ldso/dynlink.c

+ 1 - 4
src/internal/version.c

@@ -1,12 +1,9 @@
-#ifdef SHARED
-
 #include "version.h"
 
 static const char version[] = VERSION;
 
+__attribute__((__visibility__("hidden")))
 const char *__libc_get_version()
 {
 	return version;
 }
-
-#endif

+ 1 - 0
src/ldso/dynlink.c

@@ -101,6 +101,7 @@ int __init_tp(void *);
 void __init_libc(char **, char *);
 void *__copy_tls(unsigned char *);
 
+__attribute__((__visibility__("hidden")))
 const char *__libc_get_version(void);
 
 static struct builtin_tls {