From owner-freebsd-current Thu Oct 31 10:23:53 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BADA937B401 for ; Thu, 31 Oct 2002 10:23:52 -0800 (PST) Received: from h132-197-179-27.gte.com (h132-197-179-27.gte.com [132.197.179.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id E0AFC43E3B for ; Thu, 31 Oct 2002 10:23:51 -0800 (PST) (envelope-from ak03@gte.com) Received: from kanpc.gte.com (localhost [IPv6:::1]) by h132-197-179-27.gte.com (8.12.6/8.12.6) with ESMTP id g9VINjaP075062; Thu, 31 Oct 2002 13:23:45 -0500 (EST) (envelope-from ak03@kanpc.gte.com) Received: (from ak03@localhost) by kanpc.gte.com (8.12.6/8.12.6/Submit) id g9VINjNA075061; Thu, 31 Oct 2002 13:23:45 -0500 (EST) Date: Thu, 31 Oct 2002 13:23:45 -0500 From: Alexander Kabaev To: Daniel Eischen Cc: dfr@nlsystems.com, tlambert2@mindspring.com, current@freebsd.org Subject: Re: [PATCH: libc]Re: gnome on current Message-Id: <20021031132345.0c6901a3.ak03@gte.com> In-Reply-To: References: <20021031161630.Q69202-100000@herring.nlsystems.com> Organization: Verizon Data Services X-Mailer: Sylpheed version 0.8.5claws7 (GTK+ 1.2.10; i386-portbld-freebsd5.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 31 Oct 2002 12:20:14 -0500 (EST) Daniel Eischen 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. Just FYI. -- Alexander Kabaev To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message