From owner-freebsd-bugs@FreeBSD.ORG Sat May 24 22:28:52 2003 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EDD3537B401 for ; Sat, 24 May 2003 22:28:52 -0700 (PDT) Received: from relay.pair.com (relay.pair.com [209.68.1.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 3627543F3F for ; Sat, 24 May 2003 22:28:52 -0700 (PDT) (envelope-from peter@pogma.com) Received: (qmail 45951 invoked from network); 25 May 2003 05:28:51 -0000 Received: from p1086-ipad02kobeminato.hyogo.ocn.ne.jp (HELO pogma.com) (61.207.232.86) by relay.pair.com with SMTP; 25 May 2003 05:28:51 -0000 X-pair-Authenticated: 61.207.232.86 Date: Sun, 25 May 2003 14:28:48 +0900 Mime-Version: 1.0 (Apple Message framework v552) Content-Type: text/plain; charset=US-ASCII; format=flowed From: Peter O'Gorman To: freebsd-bugs@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: X-Mailer: Apple Mail (2.552) Subject: Bug in dlfunc with RTLD_NEXT RTLD_SELF etc X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 May 2003 05:28:53 -0000 Hi, Sorry, I do not have a freebsd machine, so I can not use the send-pr program to send this. dlfunc is implememted in libc/gen and simply calls dlsym, this works fine when doing normal lookups, but is broken for RTLD_{NEXT,SELF}. http://www.pogma.com/fink/dltest.tar should demonstrate the problem ( I am not sure that this list takes attachments). One solution would be to move dlfunc to libexec/rtld-elf (or whatever that is called), rename dlsym to something else (e.g. dlsym_real) make it static,change the __builtin_return(0) to __builtin_return(1), make a new dlsym function which calls dlsym_real (that way dlsym_real is always called with one level of indirection from both dlsym and dlfunc ). But, you guys can fix it however you please :) I was just peeking at your source code looking for idea's for opendarwin.org's dlcompat project, Shantonu Sen - ssen at opendarwin dot org - kindly ran the test code for me on his freebsd 5.0 machine. Thanks, Peter