Subject: Re: dynamic linker clarification
To: None <madhvesh.s@ap.sony.com>
From: Charles M. Hannum <abuse@spamalicious.com>
List: netbsd-help
Date: 05/15/2004 15:24:26
On Saturday 15 May 2004 12:21, Madhvesh R S wrote:
> Hi,
>
> I am refering to NetBSD-v1.6 usr/src/libexec/ld.elf_so/rtld.c file.
> In the function rtld_init(), when the self relocation of dynamic linker
> is completed, the following code is present. Here the _rtld_objlist pointer
> is initially assigned to dynamic-linker address, but in next statement,
> again it is made as NULL. Why it is so?
> Does this mean, the application program should link against
> its dependent shared objects only, not with the dynamic linker?

I'm not sure why the first assignment is there.  It's probably historical, 
from when there was more code in between.

However, the second assignment is intentional.  The application is not 
supposed to have access to rtld's namespace.