Update.
authorUlrich Drepper <drepper@redhat.com>
Thu, 8 Jun 2000 02:19:27 +0000 (02:19 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 8 Jun 2000 02:19:27 +0000 (02:19 +0000)
* elf/dl-addr.c (_dl_addr): Fill in correct information if symbol
is in main program.
* elf/Versions [ld] (GLIBC_2.2): Export _dl_argv.

ChangeLog
elf/Versions
elf/dl-addr.c

index 1079ab0..cf0b832 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2000-06-07  Ulrich Drepper  <drepper@redhat.com>
 
+       * elf/dl-addr.c (_dl_addr): Fill in correct information if symbol
+       is in main program.
+       * elf/Versions [ld] (GLIBC_2.2): Export _dl_argv.
+
        * elf/dl-addr.c (_dl_addr): Do exact testing of address range
        using l_map_start and l_map_end.
 
index 374110c..a7c5a78 100644 (file)
@@ -52,7 +52,7 @@ ld {
     _dl_dst_count; _dl_dst_substitute;
   }
   GLIBC_2.2 {
-    _dl_init; _dl_load_lock;
+    _dl_init; _dl_load_lock; _dl_argv;
 
     # this is defined in ld.so and overridden by libc
     _dl_init_first;
index 3932a65..d3adf12 100644 (file)
@@ -63,6 +63,13 @@ _dl_addr (const void *address, Dl_info *info)
   info->dli_fname = match->l_name;
   info->dli_fbase = (void *) match->l_addr;
 
+  /* If this is the main program the information is incomplete.  */
+  if (__builtin_expect (info->dli_fbase == NULL, 0))
+    {
+      info->dli_fname = _dl_argv[0];
+      info->dli_fbase = (void *) match->l_map_start;
+    }
+
   symtab = (const void *) D_PTR (match, l_info[DT_SYMTAB]);
   strtab = (const void *) D_PTR (match, l_info[DT_STRTAB]);