From owner-freebsd-threads@FreeBSD.ORG Sun Jun 6 14:52:46 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F0D9116A4CE; Sun, 6 Jun 2004 14:52:46 -0700 (PDT) Received: from mail.mcneil.com (rrcs-west-24-199-45-54.biz.rr.com [24.199.45.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBC2643D4C; Sun, 6 Jun 2004 14:52:46 -0700 (PDT) (envelope-from sean@mcneil.com) Received: from localhost (localhost.mcneil.com [127.0.0.1]) by mail.mcneil.com (Postfix) with ESMTP id 97416FD03A; Sun, 6 Jun 2004 14:52:46 -0700 (PDT) Received: from mail.mcneil.com ([127.0.0.1]) by localhost (server.mcneil.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 52133-04; Sun, 6 Jun 2004 14:52:46 -0700 (PDT) Received: from [24.199.45.54] (mcneil.com [24.199.45.54]) by mail.mcneil.com (Postfix) with ESMTP id C7CD4FD031; Sun, 6 Jun 2004 14:52:45 -0700 (PDT) From: Sean McNeil To: freebsd-amd64@freebsd.org In-Reply-To: <1086557908.52631.11.camel@server.mcneil.com> References: <1086557908.52631.11.camel@server.mcneil.com> Content-Type: text/plain Message-Id: <1086558765.59346.3.camel@server.mcneil.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Sun, 06 Jun 2004 14:52:45 -0700 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at mcneil.com cc: freebsd-threads@freebsd.org Subject: Re: symbol binding on dlopen X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jun 2004 21:52:47 -0000 On Sun, 2004-06-06 at 14:38, Sean McNeil wrote: > I have been trying to formulate a reasonable explanation why I am seeing > the following behavior: > > 1) start bash with nss_ldap. > 2) nss_ldap pulls in libpthread.so.1 via. some non-direct dependency - > libdb41.so.1. > 3) Constructor is called for libpthread.so.1 that installs signal > handler wrappers. > 4) libreadline.so.4 uses sigaction, but it is not binding to the strong > symbol of libpthread.so.1. It is still using the older one. > > Is this expected? Symbols will only be bound on the immediate > dependencies of what is loaded by dlopen, or should all symbols within > the closure be bound? (Answering my own question partly) nsdispatch calls dlopen with RTLD_LOCAL. If I understand correctly, that would mean this is expected and that libraries outside of the DAG wouldn't be effected (/lib/readline.so.4).