Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jan 1998 15:28:24 -0800 (PST)
From:      Amancio Hasty <hasty@rah.star-gate.com>
To:        dap@damon.com, hasty@rah.star-gate.com
Cc:        freebsd-hackers@FreeBSD.ORG, nate@mt.sri.com, tlambert@primenet.com
Subject:   Re: dladdr hax
Message-ID:  <199801082328.PAA04229@rah.star-gate.com>

next in thread | raw e-mail | index | archive | help
Well, the exec part is component the other is that dladdr is used
to locate where a library was loaded from. Again, for the command path
argv[0] clearly tells you where the command got executed from.

If I am not mistaken the command execution portion should be also
in the U area or some clever location for the ps to be able to 
display it.

My wild guess is that ld.so should keep an internal table of 
start - end  address plus path of library . The dladdr should
be a simple exercise to locate the address range where a variable
lies in. If we don't want to implement dladdr if the table
is accessible to the program we can do the library lookup 8)

	Cheers,
	Amancio



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801082328.PAA04229>