[RFC PATCH 1/2] dlfcn: add long double redirect wrappers for dl*sym

Joseph Myers joseph@codesourcery.com
Mon Jun 8 15:18:50 GMT 2020


On Mon, 8 Jun 2020, Paul E Murphy wrote:

> I would like to commit a patch to redirect dlsym/dlvsym in the event I need to
> backport a solution, is that objectionable?  Generating the mangles from

I think this is probably outside the scope of what dlsym/dlvsym should be 
doing at all.

It's definitely the case that if someone uses dlsym/dlvsym to look up 
symbols from their own libraries (not libc / libm), they must get exactly 
the symbols with those names and versions from their own libraries and not 
something remapped.  And if they use dlvsym at all, for any library, 
that's clearly referencing a precise symbol that should not be remapped; 
if the name and version referenced are for an IBM long double symbol, 
that's a perfectly valid way of accessing that IBM long double symbol in a 
program using IEEE binary128 long double and it would be wrong for glibc 
to suppose otherwise.  I tend to think that dlsym should be the same even 
when used on libc or libm: it should return the symbol (same version that 
a newly linked binary would get, see bug 14932) with that name in the 
dynamic ELF symbol table, with it being the application's job to map from 
C API names to the names required at the ELF level.

-- 
Joseph S. Myers
joseph@codesourcery.com


More information about the Libc-alpha mailing list