Subject: Re: dynamic linker
To: Madhvesh R S <madhvesh.s@ap.sony.com>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-help
Date: 02/12/2004 22:45:57
On Thu, Feb 12, 2004 at 02:10:04PM +0530, Madhvesh R S wrote:
> Hi,
> 
> I am referring to NetBSD-v1.6.
> 
> When the executable a.out is executed, the dynamic linker (libexec_elf)
> does the relocation for unresolved symbols with shared
> libraries and executes the main function. Within the
> main program if i do execl("any-executable"), then the
> new program execution will be started. For new executable,
> whether again the dynamic linker does the relocation or is
> it done as part of NetBSD kernel?

No, the dynamic linker does the relocation for each exec*()

> 
> Is there any way to debug the relocation done by dynamic linker
> at the beginning and as part of execl function?

You can try rebuilding the dynmaic linker with -DDEBUG, and set the LD_DEBUG
environnement variable.

> 
> Also in NetBSD, is there any tool which can debug the kernel
> source similar to Linux KDB?

ddb(4)

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--