Subject: dynamic linker clarification
To: None <netbsd-help@NetBSD.org>
From: Madhvesh R S <madhvesh.s@ap.sony.com>
List: netbsd-help
Date: 05/15/2004 17:51:13
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?


============================================================================
	/*
	 * Set up the _rtld_objlist pointer, so that rtld symbols can be found.
	 */
	_rtld_objlist = &_rtld_objself;

	/* Make the object list empty again. */
	_rtld_objlist = NULL;				<===
	_rtld_objtail = &_rtld_objlist;
============================================================================

Thanks in advance
-MS