Subject: Re: dlopen(0, 1) should work?
To: Simon J. Gerraty <sjg@quick.com.au>
From: Zdenek Salvet <salvet@horn.ics.muni.cz>
List: current-users
Date: 03/02/1998 08:15:57
> (gdb) l
> 10      {
> 11          struct so_map *so_map;
> 12      
> 13          so_map = (struct so_map *)dlopen(0, RTLD_LAZY);
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
dlopen() returns a handle to be used in calls to dlclose(), dlsym() and
dlctl(). The  value  of this handle should not be interpreted in any way
by the program.

> 14          for (; so_map; so_map = so_map->som_next) {
> 15              if (addr >= (void *) so_map->som_addr
> 16                  && (so_map->som_next == 0
> 17                      || addr < (void *)
> so_map->som_next->som_addr)) {
> 18                  break;
> 19              }
> (gdb) p so_map
> $1 = (struct so_map *) 0x1
> (gdb) 
> 
> 
> 


-- 
Zdenek Salvet                                              salvet@ics.muni.cz 
----------------------------------------------------------------------------
           If God had meant for us to be in the Army,
         we would have been born with green, baggy skin.