aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-09-18 06:46:52 +0000
committerUlrich Drepper <drepper@redhat.com>2004-09-18 06:46:52 +0000
commit7a11603dc6bde67066ce6f8d4c5f6b86bebaf3c1 (patch)
tree310fc0913c5e35b0a6e05bfab4423e38012e6ecf /sysdeps
parentf04b1e1f0f86cce932ede5b5a088c0ec4712ce34 (diff)
downloadglibc-7a11603dc6bde67066ce6f8d4c5f6b86bebaf3c1.tar
glibc-7a11603dc6bde67066ce6f8d4c5f6b86bebaf3c1.tar.gz
glibc-7a11603dc6bde67066ce6f8d4c5f6b86bebaf3c1.tar.bz2
glibc-7a11603dc6bde67066ce6f8d4c5f6b86bebaf3c1.zip
Update.
2004-09-17 Ulrich Drepper <drepper@redhat.com> * include/link.h (struct link_map): Add l_used element. * sysdeps/generic/ldsodefs.h: Define DL_DEBUG_UNUSED. * elf/rtld.c (process_dl_debug): Recognize unused. (dl_main): When unused debug flag is set check for unused direct dependencies. When printing dependencies and SONAME starts with /, omit the SONAME => part. * elf/dl-lookup.c (_dl_lookup_symbol_x): Mark object in which the symbol has been found as used. * elf/ldd.bash.in: Add -u option.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/ldsodefs.h5
-rw-r--r--sysdeps/posix/getaddrinfo.c6
2 files changed, 6 insertions, 5 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 49f766642c..be3d2dd61f 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -375,9 +375,10 @@ struct rtld_global_ro
#define DL_DEBUG_RELOC (1 << 5)
#define DL_DEBUG_FILES (1 << 6)
#define DL_DEBUG_STATISTICS (1 << 7)
+#define DL_DEBUG_UNUSED (1 << 8)
/* These two are used only internally. */
-#define DL_DEBUG_HELP (1 << 8)
-#define DL_DEBUG_PRELINK (1 << 9)
+#define DL_DEBUG_HELP (1 << 9)
+#define DL_DEBUG_PRELINK (1 << 10)
/* Cached value of `getpagesize ()'. */
EXTERN size_t _dl_pagesize;
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index c8cb752b18..f9d0bf42fe 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -293,8 +293,8 @@ gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp,
no_data = 0; \
while (1) { \
rc = 0; \
- status = DL_CALL_FCT (fct, (name, _family, &th, tmpbuf, \
- tmpbuflen, &rc, &herrno, NULL, &localcanon)); \
+ status = DL_CALL_FCT (fct, (name, _family, &th, tmpbuf, tmpbuflen, \
+ &rc, &herrno, NULL, &localcanon)); \
if (rc != ERANGE || herrno != NETDB_INTERNAL) \
break; \
tmpbuf = extend_alloca (tmpbuf, tmpbuflen, 2 * tmpbuflen); \
@@ -343,7 +343,7 @@ gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp,
pat = &((*pat)->next); \
} \
\
- if (localcanon != NULL) \
+ if (localcanon != NULL && canon == NULL) \
canon = strdupa (localcanon); \
\
if (_family == AF_INET6 && i > 0) \