See the comment around line 72 of usr/src/uts/common/sys/fasttrap.h:

http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/sys/fasttrap.h#72

The pid provider uses some space reserved in each thread's ulwp_t structure
to implement displaced execution. Each thread eventually has a ulwp_t, but
the first thread doesn't until libc initializes. To allow users to trace
processes from the very first instruction (instead of only after libc
initialized), the linker contains some scratch space that it communicates to
the kernel in a ELF program header. The kernel (see elfexec() and
dtrace_safe_phdr()) takes that program header of type PT_SUNWDTRACE_SIZE and
sets the ISA-specific thread-pointer value to point to dtrace_data.

Adam

On Tue, Feb 27, 2007 at 02:47:41AM -0800, DEEPAK BHATIA wrote:
> Hi,
> 
> The dtrace_data.c file is related to the dynamic tracing. Why this file is 
> just linked into the ld.so.1 using -ztrace=dtrace_data in Makefile.com ? How 
> do we use this file for dynamic tracing ?
> 
> Thanks
> 
> Deepak Bhatia
>  
>  
> This message posted from opensolaris.org
> _______________________________________________
> tools-linking mailing list
> tools-linking at opensolaris.org

-- 
Adam Leventhal, Solaris Kernel Development       http://blogs.sun.com/ahl

Reply via email to