I tried building glibc-2.10.1 with disable-hidden-plt configure option, nscd failed to link due to the following error: make[2]: Entering directory `/home/ura/glibc/glibc-2.10.1/nscd' connections.c: In function nscd_run_worker: connections.c:1724: warning: no return statement in function returning non-void /home/ura/glibc/glibc-2.10.1/build-i686-linuxnptl/nscd/connections.o: In function `nscd_init': /home/ura/glibc/glibc-2.10.1/nscd/connections.c:528: warning: warning: inotify_init1 is not implemented and will always fail /home/ura/glibc/glibc-2.10.1/build-i686-linuxnptl/nscd/getpwnam_r.o: In function `__getpwnam_r': /home/ura/glibc/glibc-2.10.1/nscd/../nss/getXXbyYY_r.c:268: undefined reference to `__nss_next2' /home/ura/glibc/glibc-2.10.1/build-i686-linuxnptl/nscd/getpwuid_r.o: In function `__getpwuid_r': /home/ura/glibc/glibc-2.10.1/nscd/../nss/getXXbyYY_r.c:268: undefined reference to `__nss_next2' /home/ura/glibc/glibc-2.10.1/build-i686-linuxnptl/nscd/getgrnam_r.o: In function `__getgrnam_r': /home/ura/glibc/glibc-2.10.1/nscd/../nss/getXXbyYY_r.c:268: undefined reference to `__nss_next2' /home/ura/glibc/glibc-2.10.1/build-i686-linuxnptl/nscd/getgrgid_r.o: In function `__getgrgid_r': /home/ura/glibc/glibc-2.10.1/nscd/../nss/getXXbyYY_r.c:268: undefined reference to `__nss_next2' /home/ura/glibc/glibc-2.10.1/build-i686-linuxnptl/nscd/gethstbyad_r.o: In function `__gethostbyaddr2_r': /home/ura/glibc/glibc-2.10.1/nscd/../nss/getXXbyYY_r.c:268: undefined reference to `__nss_next2' /home/ura/glibc/glibc-2.10.1/build-i686-linuxnptl/nscd/gethstbynm3_r.o:/home/ura/glibc/glibc-2.10.1/nscd/../nss/getXXbyYY_r.c:268: more undefined references to `__nss_next2' follow collect2: ld returned 1 exit status make[2]: *** [/home/ura/glibc/glibc-2.10.1/build-i686-linuxnptl/nscd/nscd] Error 1 make[2]: Leaving directory `/home/ura/glibc/glibc-2.10.1/nscd' make[1]: *** [nscd/others] Error 2 make[1]: Leaving directory `/home/ura/glibc/glibc-2.10.1' make: *** [all] Error 2
Then don't use the option. This is why the Makefile rules are what they are.
I see, but I need glibc with --disable-hidden-plt. I found the cause of this link error. The cause is the "atrribute_hidden" in the declaration of "__nss_next2()" occurres. The link successes by appling the following patch. --- nss/nsswitch.h.orig 2009-08-19 16:59:31.000000000 +0900 +++ nss/nsswitch.h 2009-08-19 17:03:43.000000000 +0900 @@ -127,7 +127,7 @@ natural end. */ extern int __nss_next2 (service_user **ni, const char *fct_name, const char *fct2_name, void **fctp, int status, - int all_values) attribute_hidden; + int all_values); libc_hidden_proto (__nss_next2) extern int __nss_next (service_user **ni, const char *fct_name, void **fctp, int status, int all_values); (In reply to comment #1) > Then don't use the option. This is why the Makefile rules are what they are. (In reply to comment #1) > Then don't use the option. This is why the Makefile rules are what they are.