summary refs log tree commit diff
path: root/elf/dl-lookup.c
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 /elf/dl-lookup.c
parentf04b1e1f0f86cce932ede5b5a088c0ec4712ce34 (diff)
downloadglibc-7a11603dc6bde67066ce6f8d4c5f6b86bebaf3c1.tar.gz
glibc-7a11603dc6bde67066ce6f8d4c5f6b86bebaf3c1.tar.xz
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 'elf/dl-lookup.c')
-rw-r--r--elf/dl-lookup.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 2b73da591a..d2a6976e4e 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -344,6 +344,9 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map,
 				  symbol_scope, version, type_class,
 				  flags, skip_map);
 
+  /* The object is used.  */
+  current_value.m->l_used = 1;
+
   if (__builtin_expect (GLRO(dl_debug_mask)
 			& (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))
     _dl_debug_bindings (undef_name, undef_map, ref, symbol_scope,