Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 May 2003 14:28:48 +0900
From:      Peter O'Gorman <peter@pogma.com>
To:        freebsd-bugs@freebsd.org
Subject:   Bug in dlfunc with RTLD_NEXT RTLD_SELF etc
Message-ID:  <C312209B-8E71-11D7-8324-003065F6C222@pogma.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C312209B-8E71-11D7-8324-003065F6C222>