Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Oct 2002 13:46:53 -0500 (EST)
From:      Daniel Eischen <eischen@pcnet1.pcnet.com>
To:        Alexander Kabaev <ak03@gte.com>
Cc:        dfr@nlsystems.com, tlambert2@mindspring.com, current@freebsd.org
Subject:   Re: [PATCH: libc]Re: gnome on current
Message-ID:  <Pine.GSO.4.10.10210311346010.2281-100000@pcnet1.pcnet.com>
In-Reply-To: <20021031132345.0c6901a3.ak03@gte.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 31 Oct 2002, Alexander Kabaev wrote:

> On Thu, 31 Oct 2002 12:20:14 -0500 (EST)
> Daniel Eischen <eischen@pcnet1.pcnet.com> wrote:
> 
> > I wonder how it works for Solaris (you can see both the non-underscore
> > and single-underscore symbols resolve to the same thing)?  Perhaps their
> > stubs in libc pull the libgcc trick?
> 
> Solaris libc uses something called ti_jmp_table to locate pthread symbols.
> Both _pthread and pthread functions resolve to the same stub which does
> something like this:
> 
> 1) fetch a function pointer from the ti_jmp_table
> 2) jump to it.
> 
> By default, ti_jump_table entries contain pointers to dummy function like
> _return_zero if no threading library is loaded. When the threading library is
> loaded, ti_jump_table is populated with new pointers to functions implemented
> in threading library library. GDB did not allow me to track down where exactly
> this happens, I presume .init function in libpthread.so does that.

That sounds easy enough to do.

Anyone think this is a bad idea?

-- 
Dan Eischen



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10210311346010.2281-100000>